Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 08 Dec 2015, 22:37
michaeld42 michaeld42 is offline
 
Join Date: Jan 2010
global.php missing in vB5?

In upgrading from vB4 to vB5, one custom page crashes because there is no global.php file in the vB5 folder. Should there be one, and if so where do I find it? Or is it no longer needed for vB5?

BTW, I had no idea what the thread prefix should be for this.
Reply With Quote
  #2  
Old 08 Dec 2015, 23:37
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Real name: Zachery Woods
There is no global.php file like you're expecting in vBulletin 5.

What did your custom page do?
__________________
Looking for ImpEx?
Reply With Quote
  #3  
Old 09 Dec 2015, 02:03
michaeld42 michaeld42 is offline
 
Join Date: Jan 2010
The page has a JavaScript Google maps app. It was part of the CMS, not the forum, but users could log in to retrieve saved maps. The page is here (vB4) http://www.roadtripamerica.com/maps/mapwizard.php but in vB5 the page crashes on the PHP line "require_once('./global.php');" because there is no global.php in the appropriate directory (or anywhere else).

That PHP code is commented "Require back end", I assume because logging in is not usually part of the non-forum pages. Is there anything I need to do to be sure that users can log in (and the code can test for vBulletin variables) in the non-forum pages?

Last edited by michaeld42; 09 Dec 2015 at 02:15.
Reply With Quote
  #4  
Old 09 Dec 2015, 09:11
Dave Dave is online now
 
Join Date: Jun 2010
Real name: Dave
vBulletin 5 is quite different than vBulletin 4. Custom coded plugins/pages that relied on vBulletin 4 will probably have to be rewritten to work with vBulletin 5.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #5  
Old 09 Dec 2015, 14:18
michaeld42 michaeld42 is offline
 
Join Date: Jan 2010
Not a problem, I'm a programmer, but is this the right place to find out how to do it?
Reply With Quote
  #6  
Old 09 Dec 2015, 15:54
Dave Dave is online now
 
Join Date: Jun 2010
Real name: Dave
Well there seems to be a global.php file in the core folder, I don't know if it provides the same functionality as the vBulletin 4 version.

I think you can include the core/includes/init.php file which should provide you with the $vbulletin registry and $db database.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #7  
Old 09 Dec 2015, 16:41
michaeld42 michaeld42 is offline
 
Join Date: Jan 2010
Thanks! It does look like the same file (but updated). I overlooked the core folder.

--------------- Added 10 Dec 2015 at 02:49 ---------------

I attempted to use the global.php as in vB4 but now I get the error message "Access denied".
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 18:44.

Layout Options | Width: Wide Color: