TinyPortal

Development => Support => Topic started by: envon on September 19, 2005, 09:10:13 AM

Title: Boy I messed up!!!
Post by: envon on September 19, 2005, 09:10:13 AM
Bloc,
I was adding a center php block with a code that is running in a left side block.  Its a cpm_Fetch object.  I was wanting to use the function to pull images from my  Coppermine gallery as it is doing now in the left side block.  But when I added it to a center block to pull images from a different album I get a fatal error

Fatal error: Cannot redeclare class cpm in /home/vongr2/public_html/cpmfetch/cpmfetch.php on line 33

Now I can't even get into the tpadmin to remove the code.

Here is the addy for the tp
www.mretattoo.com/forum2

Where do I go to remove the code from the center block manually?

Also what did I do wrong? The cpm_fetch is working fine in the left side block.  Can I not use the same cpm_fetch twice on the same page?

here is the code from cpm_fetch

echo '<div align="right">';
include "../cpmfetch/cpmfetch.php";
$objCpm = new cpm("/tatPort");
$objCpm->cpm_viewRandomMediaFrom(1,1);
$objCpm->cpm_close();
echo '</div>';


With changes to the array in the viewRandomMediaFrom() function to point to the different albums.

Mostly I need to remove the center block phpbox so tp will function again and if you have a sugesstion as to why the second insertion of cpm_fetch screwed things up.[url]] (http://[/url)//
Title: Re: Boy I messed up!!!
Post by: carver on September 19, 2005, 02:12:25 PM
Look in the database and see if you can not remove that block from there. I had a similar problem and when I removed the block from the databse it cleared the problem.
Title: Re: Boy I messed up!!!
Post by: envon on September 19, 2005, 05:48:27 PM
Thanx so very much!!!!! Now to figure out a work around. Any Ideas? Anyone?
Title: Re: Boy I messed up!!!
Post by: bloc on September 19, 2005, 06:57:22 PM
Try to either use include_once "../cpmfetch/cpmfetch.php"; in both blocks - or not at all in the second block.
Title: Re: Boy I messed up!!!
Post by: envon on September 19, 2005, 07:26:09 PM
Thanks Bloc the include_once was the answer