CPMFetch not working on some pages. CPMFetch not working on some pages.
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

CPMFetch not working on some pages.

Started by SkinsFan, September 07, 2009, 09:01:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SkinsFan

Hi, i am using cpmfetch on my site http://fangs-up.com and as you can see it does work, however on the page http://fangs-up.com/wp/ it comes up with this error:

Warning: include_once(gallery/cpmfetch/cpmfetch.php) [function.include-once]: failed to open stream: No such file or directory in /home/fakefan1/public_html/fangs-up.com/wp/wp-content/themes/classic/header.php on line 33

Warning: include_once() [function.include]: Failed opening 'gallery/cpmfetch/cpmfetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/fakefan1/public_html/fangs-up.com/wp/wp-content/themes/classic/header.php on line 33

Fatal error: Class 'cpm' not found in /home/fakefan1/public_html/fangs-up.com/wp/wp-content/themes/classic/header.php on line 34


how can i stop this and what is causing it?

Nibbler

Problem is that you used the wrong path. Solution is to use the correct path.

SkinsFan

what would the correct path be? would i not have to go down a folder as the gallery folder and the wp folders are in the same level? is this possible?

poubao

Try to disable the $objCpm->cpm_close()  like this:   //$objCpm->cpm_close();

L'incohérence de ceux qui nous dirigent, l'incompétence de ceux qui nous commandent,sont un vibrant hommage pour ceux qui exécutent.
                                          **Général Patton**

SkinsFan

no, that doesnt work either. it keeps the same error.

poubao

May be you make a mistake when you paste your code, try to copy the code you use in http://fangs-up.com/videos.php
L'incohérence de ceux qui nous dirigent, l'incompétence de ceux qui nous commandent,sont un vibrant hommage pour ceux qui exécutent.
                                          **Général Patton**

phill104

Or you could just do as Nibbler suggests ;)

It is a mistake to think you can solve any major problems just with potatoes.

SkinsFan

I thought i was using the right path. And its the same code as i use on all pages, its in the sidebar.php, not individually on every page. its alright saying use the right path, but when you dont give the right path or any hints what sort of help is that!?

freesouljah

Quote from: SkinsFan on September 13, 2009, 07:24:14 PM
I thought i was using the right path. And its the same code as i use on all pages, its in the sidebar.php, not individually on every page. its alright saying use the right path, but when you dont give the right path or any hints what sort of help is that!?

since the file that is working, the index page, is not in the /wp/ directory, that means that your path has to change in order for the code to work in the /wp/ directory.....some folks assume you should know this, that is why they didn't tell you what to change...

;)

try changing the code to:

include $_SERVER['DOCUMENT_ROOT'].'/gallery/cpmfetch/cpmfetch.php';
  $objCpm = new cpm("../gallery/cpmfetch/cpmfetch_config.php");


SkinsFan

thanks! now it works on the files in the wp folder, but not on those not in it :/

phill104

There is not a lot more we can tell you. There are many resources out there for learning basic skills such as paths. Teaching that is beyond the scope of this board.

Here is a good guide which might make it clearer in your mind.

http://www.webdiner.com/webadv/begin/paths.htm
It is a mistake to think you can solve any major problems just with potatoes.

freesouljah

Quote from: SkinsFan on September 15, 2009, 08:26:36 PM
thanks! now it works on the files in the wp folder, but not on those not in it :/

you need to use a different set of code for the index file...use the one that works in /wp/ for that file...and then change the code so that it works on the index page (the way you had it originally)...

so you will have two cpmfetch codes, one with the path I gave you and one with the original path that you had...