The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Strange DB Error when integrating "global.php" in a live site. PLEASE HELP.
We are trying to integrate global.php file on a live site and are getting a very strange error.
This particular site works with classes (each page of the site is a class called by the index.php) and connects to its own Database, which is different to the vB Database. The page where we want to integrate the forum is just another class (called "Forum") that gets called by the main index.php file of the site. All we added to this "Forum" class was the line require_once('[vb dir]/global.php'); to test it. But when we run it on our live site, it echo's the standard vB Database error: PHP Code:
So we looked into class_core.php and have narrowed the error down to this line: PHP Code:
We've edited that class_core.php file to do an echo of the following variables contained in that line:
What's strange is that it is echoing those values TWICE, which must mean require_once ('[vb dir]/global.php'); is calling that vB line / function two times (and we have no idea why). However, it only calls it twice when we are logged into our site, because if we are logged off, it only calls it once and no VB / Database error is produced. When we are logged-in and it calls it twice, the first time it gets called, all the values are correct, but the second time (lower in the page), they are wrong and seem to contain values from the main Database of the site and that's why it's producing a MySQL connection error. (To be clear, our "Forum" class is NOT getting called twice, not even when logged-in, so it's not that). It gets stranger. We had the script echo the microtime() before and after global.php gets called in our "Forum" class, and before and after the line above gets executed within the class_core.php to see at what point that line is getting executed a second time and echoing that error. Well, that line is getting executed the second time several microseconds AFTER the microsecond that appears after global.php gets called in the "Forum" class, so how in the world is this line getting called a second time and AFTER global.php has already run? This must be some kind of Database conflict with the live site, but we don't know how to isolate it or resolve it, nor do we know how to find out exactly what is causing this. Can anyone please help us solve this mystery? Thanks! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|