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

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

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();
?>