[Solved]: Cpmfetch doesn't work, need help [Solved]: Cpmfetch doesn't work, need help
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[Solved]: Cpmfetch doesn't work, need help

Started by Cove, May 13, 2008, 09:54:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Cove

Hi, everybody. I have the following trouble:
Code:
<?php
  
include "http://forum.hromov.net/photo/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("http://forum.hromov.net/photo/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>

Error:
Fatal error: Cannot instantiate non-existent class: cpm in /usr/home/cove/domains/hromov.net/public_html/forum/cpmfetch.php on line 3

All pathes are right. I really don't understand, what is the reason of this trouble. When i run cpmfetch install.php i see the images, located in my gallery and when i click them, i go to the right page. Can anybody help me to solve this problem?

System:
CPG - v1.4.18;
Copperminefetch - 2.0.0;
CPG Integration -  vBulletin 3.6.4;
Server -  FreeBSD 6.2 and Apache/1.3.34;
PHP -4.3.11;
MySQL - 4.1.14.


Nibbler


Cove

Quote from: Nibbler on May 13, 2008, 09:56:23 PM
Use a path not an URL.
Thanks's a lot, now all works perfect!
p.s. If it's to be fair, i don't understand why an URL doesn't work  :'(

Nibbler

If you use an URL PHP will see the same thing you see if you go to the URL with your browser; a blank page. You need PHP to load the source code of the file instead so you have to use a path.

Cove

Quote from: Nibbler on May 13, 2008, 10:40:43 PM
If you use an URL PHP will see the same thing you see if you go to the URL with your browser; a blank page. You need PHP to load the source code of the file instead so you have to use a path.
Ok, i understand, thanks.
But now i have another one trouble (all pathes are right at this time) with the code from Cpgfetch documentation, which makes a random images representation:
Code

<?php
  
include_once "photo/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("photo/cpmfetch/cpmfetch_config.php");
  
$options = array(?subtitle? => ?File name : {{pFilename}}?);
  
$objCpm->cpm_viewLastAddedMedia(14$options);
  
$objCpm->cpm_viewRandomMediaFrom(?cat=1?,14$options);
  
$objCpm->cpm_close();
?>


Error:
Parse error: parse error, unexpected '?', expecting ')' in /usr/home/cove/domains/hromov.net/public_html/forum/cpmfetch.php on line 18

Nibbler

Change all the question marks to quotes, ie.


<?php
  
include_once "photo/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("photo/cpmfetch/cpmfetch_config.php");
  
$options = array('subtitle' => 'File name : {{pFilename}}');
  
$objCpm->cpm_viewLastAddedMedia(14$options);
  
$objCpm->cpm_viewRandomMediaFrom('cat=1',14$options);
  
$objCpm->cpm_close();
?>



Please try to keep to one issue per thread; it's the rule.

Cove

Quote from: Nibbler on May 13, 2008, 10:50:08 PM
Please try to keep to one issue per thread; it's the rule.
Ok. It seems to me that i've solved all my problems now. Thank you very much!