The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hy,
I'm trying to make an outside login for the user, without the user having to be on the forum or even to be redirected inside it. But, there is a problem... When using: chdir('./forum/'); require_once('./global.php'); I get: Fatal error: Call to a member function query_first() on a non-object in [path]\forum\includes\functions.php on line 1533 Fatal error: Call to a member function unlock_tables() on a non-object in [path]\forum\includes\functions.php on line 4240 So, I went to debug it with: if(!is_object($vbulletin) die ("Not object"); and guess the result? ![]() When using the vbulletin normally no problem is reached, but when including any file (example: global.php or login.php) I get the same error. What can be wrong? The things I was seeing in the forum where related with the case-sensitive issue of Linux, but in this case you can't miss it... all lowercase. Can someone give me a hand? Best regards, Miguel Sim?es |
#2
|
||||
|
||||
![]()
If it's within a function, you will need to do a global $vbulletin; or global $db; to get it in scope.
Amy |
#3
|
||||
|
||||
![]()
Change:
PHP Code:
PHP Code:
![]() - Zero Tolerance |
#4
|
|||
|
|||
![]()
amykhar:
This is a VB function, not mine :squareeyed: I'm just making (until now) the include of global.php and already getting errors. Zero Tolerance: Nothing change :| I had the same issue before, when using the 3.0.X versions. I'm using PHP5 and I've been reading the Documentation of VB, but it only tells the "latest PHP version", so I assume that it is PHP5 compilant, even if not using a OOP structure (public, private, extends, etc... are not used). just a note: chdir('./forum/') or chdir('./forum') or chdir('forum/') are the same thing ![]() Hmmm... Just created a script with: error_reporting(E_ALL & ~E_NOTICE); chdir('forum/'); require_once('global.php'); And it works... nothing more. I guess that some other code within my application that is messing around with VB. But what can it be? :| Thankx for the tip anyway. Best regards, Miguel Sim?es |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|