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

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

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