ERROR: Cannot redeclare class cpm in (Using "INCLUDE" twice on the same page) ERROR: Cannot redeclare class cpm in (Using "INCLUDE" twice on the same page)
 

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

ERROR: Cannot redeclare class cpm in (Using "INCLUDE" twice on the same page)

Started by yazeft, July 20, 2007, 07:46:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

yazeft

Hi, i've got coppermine and SMF bridge.

i'm trying to use the CPG include in the smf template twice, once for random pics and once for latest pics on the same page..

i've tried everything that i can find from the search and still nothing works..

please let me know if there is another way to get this working..

my code:

<?php

// ..code here...

</td>
<td valign="middle" align="center" height="75">';

include ("Sources/gallerylatest.php");

echo '
</td>

// ...more code here...

  
</td>
  
<td class="windowbg2" width="100%">';

include ("Sources/galleryrandom.php");

echo '
</td>

// ..more code here...

?>


This is the code for my boardindex.template.php - as you can see i've used cpg include twice and only the first one works.. at the top of the page.. the one at the bottom of the page doesnt work.. i get the error:

"Cannot redeclare class cpm..."

i've tried everything possible, to no avail..

please help, thanks.

vuud

Quote from: yazeft on July 20, 2007, 07:46:59 PM
Hi, i've got coppermine and SMF bridge.

i'm trying to use the CPG include in the smf template twice, once for random pics and once for latest pics on the same page..

i've tried everything that i can find from the search and still nothing works..

please let me know if there is another way to get this working..

my code:

<?php

// ..code here...

</td>
<td valign="middle" align="center" height="75">';

include ("Sources/gallerylatest.php");

echo '
</td>

// ...more code here...

  
</td>
  
<td class="windowbg2" width="100%">';

include ("Sources/galleryrandom.php");

echo '
</td>

// ..more code here...

?>


This is the code for my boardindex.template.php - as you can see i've used cpg include twice and only the first one works.. at the top of the page.. the one at the bottom of the page doesnt work.. i get the error:

"Cannot redeclare class cpm..."

i've tried everything possible, to no avail..

please help, thanks.

Two things...

1) Only do the include once

2) Only do the new statement once

3) Don't close at the end of the first one

Well, three...


Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco