forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: meghan33 on September 03, 2009, 08:41:19 am

Title: [Solved]: Getting Fatal Error Message
Post by: meghan33 on September 03, 2009, 08:41:19 am
I keep getting this message when I try and to add the code to the main site.

Quote
Fatal error: Cannot redeclare class cpm_dao in /home/meghan3/RebeccaHerbst/Media/cpmfetch/cpmfetch_dao.php on line 22


And this is the code i am using

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

And it all install correctly. I didn't have any problems till I added the code to the main layout.
Title: Re: Getting Fatal Error Message
Post by: Nibbler on September 03, 2009, 12:08:45 pm
Means you are aleady using cpmfetch somewhere else in the page. Remove the second include line.
Title: Re: Getting Fatal Error Message
Post by: meghan33 on September 03, 2009, 04:53:45 pm
It worked thank you.