coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: SkinsFan on September 07, 2009, 09:01:46 PM

Title: CPMFetch not working on some pages.
Post by: SkinsFan on September 07, 2009, 09:01:46 PM
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?
Title: Re: CPMFetch not working on some pages.
Post by: Nibbler on September 08, 2009, 11:36:55 PM
Problem is that you used the wrong path. Solution is to use the correct path.
Title: Re: CPMFetch not working on some pages.
Post by: SkinsFan on September 12, 2009, 09:13:22 AM
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?
Title: Re: CPMFetch not working on some pages.
Post by: poubao on September 12, 2009, 10:01:19 AM
Try to disable the $objCpm->cpm_close()  like this:   //$objCpm->cpm_close();

Title: Re: CPMFetch not working on some pages.
Post by: SkinsFan on September 12, 2009, 06:20:14 PM
no, that doesnt work either. it keeps the same error.
Title: Re: CPMFetch not working on some pages.
Post by: poubao on September 13, 2009, 09:37:17 AM
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 (http://fangs-up.com/videos.php)
Title: Re: CPMFetch not working on some pages.
Post by: phill104 on September 13, 2009, 12:49:41 PM
Or you could just do as Nibbler suggests ;)

Title: Re: CPMFetch not working on some pages.
Post by: 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!?
Title: Re: CPMFetch not working on some pages.
Post by: freesouljah on September 15, 2009, 06:15:10 AM
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");

Title: Re: CPMFetch not working on some pages.
Post by: 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 :/
Title: Re: CPMFetch not working on some pages.
Post by: phill104 on September 15, 2009, 09:15:02 PM
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
Title: Re: CPMFetch not working on some pages.
Post by: freesouljah on September 16, 2009, 09:05:28 PM
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...