The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I'm trying to log in from another part of my website.
I do this: chdir ( '../../public_html/forums' ); require_once 'global.php'; And get this error: Fatal error: Call to a member function on a non-object in /home/wa/public_html/forums/includes/sessions.php on line 73 Which is on a $DB_site line call.. I checked in includes/init.php and the $DB_site object is created just fine. Why isn't it accessible from within sessions.php? Thanks! |
#2
|
|||
|
|||
![]()
Change to:
PHP Code:
|
#3
|
|||
|
|||
![]()
uhm, what's the difference?
Update: I can access it fine in Sessions.php but not in the function build_session.. In that function it is defined as global $DB_site; so I don't understand why it wouldn't work. I echoed out the contents of $DB_site just before the call to the function and in the function. Works fine before, but is empty when inside the function. Any ideas what is causing this? Thanks |
#4
|
||||
|
||||
![]() Quote:
|
#5
|
|||
|
|||
![]()
Require_once doesn't require parentheses..There is no difference in using them or not, it may not be best coding practices, but it works. However, thanks for pointing that out.
Now, this function isn't new, it's build_session from sessions.php and it already has global $DB_site as I pointed out in my previous post. Any other ideas? Thanks |
#6
|
|||
|
|||
![]()
Can anyone help?
Thanks! |
#7
|
|||
|
|||
![]()
Well maybe you should try to show a bit more of your script. Very hard to give a solution (or even understand your problem) by just 2 lines.
|
#8
|
|||
|
|||
![]()
" chdir( '../../public_html/forums' ); "
^^ What the hell is this? Of course you would get errors if you try to exit the root directory like this.. Where is your script located? If it is in root, then use: chdir( './forums' ); If, for example, it is in public_html/somefolder, use: chdir( '../forums' ); But do not ever tell your script to go deeper than public_html... I wonder how you don't get a fatal error... |
#9
|
|||
|
|||
![]()
You need to show a bit more of your code in order for a proper answer to be given. I have a feeling.....
show me some code and i'll see if I can help. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|