foxfirediego
10-27-2010, 06:55 PM
Hi there, I'm trying to bridge a software with vB, but if I include the './global.php' file, I get the following:
Fatal error: Call to a member function query_read_slave() on a non-object in .\vbulletin\includes\functions.php on line 3205
This is the code I was trying to use to be able to avoid that, no success tought:
$_SESSION['original_db'] = $GLOBALS['db'];
unset($GLOBALS['db']);
//here the $GLOBALS['db'] doesn't exist
require_once('class.vbulletin-bridge.php');
//my vb functions/methods/etc
$GLOBALS['db'] = $_SESSION['original_db'];
Running vBulletin 3.8.6
Here is the file I'm using which works pretty well:
http://www.phpclasses.org/browse/file/28845.html
Any help is appreciated.
Thanks
Diego
Fatal error: Call to a member function query_read_slave() on a non-object in .\vbulletin\includes\functions.php on line 3205
This is the code I was trying to use to be able to avoid that, no success tought:
$_SESSION['original_db'] = $GLOBALS['db'];
unset($GLOBALS['db']);
//here the $GLOBALS['db'] doesn't exist
require_once('class.vbulletin-bridge.php');
//my vb functions/methods/etc
$GLOBALS['db'] = $_SESSION['original_db'];
Running vBulletin 3.8.6
Here is the file I'm using which works pretty well:
http://www.phpclasses.org/browse/file/28845.html
Any help is appreciated.
Thanks
Diego