Subs.php problem with SMF Bridging Subs.php problem with SMF Bridging
 

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

Subs.php problem with SMF Bridging

Started by Avinash, July 27, 2006, 09:48:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Avinash

I have Coppermine Bridged to SimpleMachines Forum, and it was working perfectly fine. I'm using the latest version of coppermine 1.4.8 I believe. I recently installed latex rendering on my site, which required me to add two lines to my Subs.php file in /smf/Sources. Now when I go to the coppermine gallery, I receive this error: Fatal error: Call to undefined function: latex_content() in /home/*****/public_html/smf/Sources/Subs.php on line 962.

This is the line I added to my Subs.php

// LATEX
include_once('Sources/latex/latex.php');
$message = latex_content($message);


The line that reads $message = latex_content($message); is line 962 if you were wondering. I want to know why I get this strange error with coppermine, but everything else works fine. I bet its a simple php syntax mistake that I'm making. Please help.

Nibbler

You can either locate the file that contains the function latex_content() and include() it into your bridge file or add a dummy function into the bridge file, like


function latex_content($foo){
    return $foo;
}

Avinash

Thanks for the reply. The line above it says: include_once('Sources/latex/latex.php'); . That file latex.php contains the function latex_content() . Does that make a difference?

Nibbler

If you want to try to code yourself a fix then yes, otherwise add the dummy function and forget about it.

Avinash

Okay, I added the fuction, and now my main SMF page gives:
Fatal error: Cannot redeclare latex_content() (previously declared in /home/*****/public_html/smf/Sources/latex/latex.php:38) in /home/****/public_html/smf/Sources/Subs.php on line 962

Nibbler

Add the dummy function into the bridge file in Coppermine, not into Subs.php

Avinash

Where's the bridge file located. I used the bridge wizard. I'm guessing /coppermine/bridge/smf10.inc.php . And does it matter where I add it in the file?


Avinash

I added it at the end of the bridge file, and it works! THANKS SO MUCH FOR YOUR HELP. I can't explain how much time that saved me :D You rock!