SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    need register_globals ON

    I'm sorry, Dr_LaRRy...I promise I tried not to use it...

    I am having to compile PHP for a server and I compile 4.2.1 no problems, until I tried to run my vBulletin 2.2.5 software which requires register_globals ON (although the upcoming 2.2.6 gets around this from my understanding....just can't wait til it comes out as I have NO IDEA when that will be.). So I figured go into my php.ini and change it and set the AllowOveride All in my httpd.conf file. Restart Apache, it should work. Alas, my phpinfo file is still reporting register_globals OFF.

    So how do I fix this?

    While I'm at it, how do I se the include path to accept includes/requires from ANY directory...I mean any on my site.

    Thanks.
    Sketch
    Aaron Brazell
    Technosailor



  2. #2
    SitePoint Columnist Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try adding the following line to the top of any PHP script files that can be publically accessed (i.e can have POST or GET variables passed to them):
    Code:
    extract($_REQUEST);
    That should work in theory.

  3. #3
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm going to try that but, for the record and for newbies, that is essentially the same thing as setting register_globals to OFF, correct?

    Sketch
    Aaron Brazell
    Technosailor



  4. #4
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Sketch
    that is essentially the same thing as setting register_globals to OFF, correct?
    that is essentially the same as setting register_globals to ON actually since you're extracting all POST/GET/COOKIE variables into the global namespace...

    as for the include path, i'm not sure how you can do that (maybe a glob * ?)... but it's best to include the path in any includes/requires so that there won't be any ambiguity in where it's coming from...

  5. #5
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On...that's what I meant.

    Thanks. Still not sure if it's working as some other problems came up, but I'll let you know.

    Sketch
    Aaron Brazell
    Technosailor



  6. #6
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    doesn't seem to be working. Any other ideas?

    I don't mind going back to php 4.1.2 but I need to figure out how to uninstall 4.2.1 then because I couldn't do it earlier. Better yet is to solve the original questions, how to make globals ENABLED...

    Sketch
    Aaron Brazell
    Technosailor



  7. #7
    SitePoint Enthusiast Patrick Lucas's Avatar
    Join Date
    Dec 2001
    Location
    Ohio
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'm running vBulletin just fine with 4.2 and register globals off. They have a patch in the announcements fourm.

    Actualy, I'm not 100% sure my forum is working. I just installed it, with the patch. It appears to be working great, but I haven't toyed with it too much.



    EDIT: Sorry. I just noticed that my server was running 4.2.1 with register_globals on. Go figure, eh?
    Last edited by Patrick Lucas; May 19, 2002 at 22:16.
    Patrick Lucas

  8. #8
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can try adding
    PHP Code:
    ini_set("register_globals"1); 
    to every page... even better if there's a page which each script includes... then you can just add it to that included page instead

  9. #9
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    patrick, they are still hunting down bugs with 4.2+ which is why perhaps your board ain't up to par. I'm going back to 4.1.2 (I think I figured it out) because I know it works and I have 2 boards to support, one with a huge amount of traffic, and can't have buggy PHP...

    Sketch
    Aaron Brazell
    Technosailor



  10. #10
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    little late. but all you should have to do is go into php.ini (assuming it's the right directory) set

    register_globals = On

    save php.ini, restart Apache and register_globals will be on. simple as that. you don't need `AllowOverride All' unless you're wanting to change register_global's value in a .htaccess file. even then, you only need `AllowOverride Options' for it to work.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •