TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 123
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 96
  • Total: 96

Boy I messed up!!!

Started by envon, September 19, 2005, 09:10:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

envon

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]]//

carver

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.

envon

Thanx so very much!!!!! Now to figure out a work around. Any Ideas? Anyone?

bloc

Try to either use include_once "../cpmfetch/cpmfetch.php"; in both blocks - or not at all in the second block.

envon

Thanks Bloc the include_once was the answer

This website is proudly hosted on Crocweb Cloud Website Hosting.