Fatal error when trying to use random image Fatal error when trying to use random image
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Fatal error when trying to use random image

Started by ondi, June 03, 2008, 12:17:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ondi

I get this error: Fatal error: Class 'cpm' not found in /home/fhlinux222/w/walthamforest-fc.co.uk/user/htdocs/photogallery/cpmfetch/random.php on line 3

here is the code in my random.php

<?php
  
include "./cpmfetch.php";
  
$objCpm = new cpm("./cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>


Anyone got any ideas?

fangweile

Your code is just right. I used it also in my site.

Dunno what is wrong but have you tried to reupload the cpmfetch package and install it again. I think it will solved your error.
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희

ondi


capecodgal

Quote
I get this error: Fatal error: Class 'cpm' not found in /home/fhlinux222/w/walthamforest-fc.co.uk/user/htdocs/photogallery/cpmfetch/random.php on line 3



so that means that the random.php file is located inside of your cpmfetch folder which is inside of your photogallery folder, correct? And that file has the code that you posted within it?

Try this instead:


<?php
  
include "cpmfetch.php";
  
$objCpm = new cpm("cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>