Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Fatal error when trying to use random image  (Read 4105 times)

0 Members and 1 Guest are viewing this topic.

ondi

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Fatal error when trying to use random image
« on: June 03, 2008, 12:17:41 pm »

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

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

Anyone got any ideas?
Logged

fangweile

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 103
  • Saranghaeyo ^_^
    • All Koreans - Home of Korean Actors and Actresses
Re: Fatal error when trying to use random image
« Reply #1 on: June 03, 2008, 01:36:46 pm »

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.
Logged
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희

ondi

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Fatal error when trying to use random image
« Reply #2 on: June 03, 2008, 02:42:51 pm »

Yeh, tried repeatedly ???!
Logged

capecodgal

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 123
Re: Fatal error when trying to use random image
« Reply #3 on: June 11, 2008, 12:22:42 am »

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:

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



Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 15 queries.