Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 30 May 2007, 06:48
SaltedSlug's Avatar
SaltedSlug SaltedSlug is offline
 
Join Date: Mar 2004
possible to include(global.php) in a class?

Hello, here's my test case (php4):

Test.php

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


dotest.php

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

always dies with:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The constructor in the class always dies at the include statement, Whoami is never called.
Is it possible to create a $vbulletin registry object inside of a class?

I did a search and attempted using the solution proposed Here by kolita, and that gives me a vbulletin object that has all the standard properties and that I can enumerate, but only if I skip creating a session (meaning my userinfo array is empty), and this is useless for me.

i.e. if I comment out

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I get the same error as above.

Anyone have some insight? I'm trying to build a amfphp connector to vbulletin and i'm truly stumped. thanks
Reply With Quote
  #2  
Old 30 May 2007, 08:19
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
Instead of include_once, try require_once.
__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #3  
Old 30 May 2007, 11:45
byon byon is offline
 
Join Date: Apr 2007
Originally Posted by Dismounted View Post
Instead of include_once, try require_once.
How would include_once be different from require_once? i guess your statement was, Instead of include, try require_once. yeah?

Sorry to hijack this thread, but it would be more logical to type here then creating another unnecessary thread.


thanks!
Reply With Quote
  #4  
Old 31 May 2007, 12:36
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
Originally Posted by byon View Post
How would include_once be different from require_once?
Include continues regardless if the file was found or not. Require spits out an error and stops execution if it doesn't find the file.
__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #5  
Old 31 May 2007, 15:51
SaltedSlug's Avatar
SaltedSlug SaltedSlug is offline
 
Join Date: Mar 2004
For the purposes of this thread there's no difference between include, require, include_once and require_once.

Note that the error is not occuring in either of the files defined above - but instead in functions.php which is part of the vbulletin inner-workings. This means that the include/require is working up until the point where something about it being inside of a class construct makes Vbulletin go haywire.
Reply With Quote
  #6  
Old 01 Jun 2007, 11:32
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
What version of vBulletin are you using? Line 1154 in 3.6.7 PL1 is part of a comment:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 03:38.

Layout Options | Width: Wide Color: