Register Globals Setting Is Disabled.........

Discussion in 'PHP' started by madhukar_garg, Jun 5, 2007.

  1. #1
    Dear members,

    please help me.

    i am getting register_globals setting disabled warning.

    i have attached a .htaccess file with my catalog folder, i have also attached php.ini file with my catalog folder.

    my .htaccess file has code given below

    <IfModule mod_php4.c>
    php_value include_path ".:/usr/local/lib/php"
    php_admin_flag safe_mode on
    php_value register_globals on
    </IfModule>

    my php.ini file have code given below

    register_globals = ON


    i have done a lot of afforts. i have read existing topics on same problem and try for solution. but my problem is still same. i need urgent help please

    Thanks in advance
    madhukar garg
     
    madhukar_garg, Jun 5, 2007 IP
  2. clancey

    clancey Peon

    Messages:
    1,099
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Some linux distros end up with more than one php.ini file. Try running the command locate php.ini to confirm that you are working on the one and only copy. Also, after making any changes to the php configuration, you need to restart your web server.
     
    clancey, Jun 5, 2007 IP
  3. alamster

    alamster Peon

    Messages:
    41
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    make php file with this code :

    phpinfo();

    save as info.php and access from browser, find location of php.ini displayed, change value of register_globals = On to Off or vice versa

    make sure to restart apache after editing php.ini file

    good luck
     
    alamster, Jun 5, 2007 IP
  4. mrmonster

    mrmonster Active Member

    Messages:
    374
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #4
    Or better yet, modify your code so that it doesn't relay on register globals, theres absolutely nothing good about it. It's given PHP a bad name in the past, its unsafe and makes for lazy coding.

    Theres a reason it's disabled by default now, I wouldn't be surprised if PHP6 totally removed that feature or bug, whatever you prefer to call it.
     
    mrmonster, Jun 5, 2007 IP
  5. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I don't know if you wanted to stay in suspense or not, but FYI, you're correct: PHP6 won't support register_globals at all.
     
    TwistMyArm, Jun 5, 2007 IP
  6. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #6
    echo "php_flag register_globals on" > /var/www/.htaccess

    this sin't php code btw... i was being a smart ass. simply put "php_flag register_globals on" without the quotes ("")... into a .htaccess file.

    as for php 6 supporting this crap, it ain't happening. :)
     
    ansi, Jun 6, 2007 IP
  7. kusum

    kusum Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    hi everbody , how is goin?
     
    kusum, Jun 6, 2007 IP
  8. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #8
    ansi, Jun 6, 2007 IP
  9. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #9
    You should change it if you can, and if you have tried all ini files and htaccess that should affect the runtime configuration of php, then the chances are your php build is ignoring those instructions, some builds do that, and CGI binaries cannot use htaccess directives.

    Some scripts you can't change though, like WHMCS - this script wont even install without register_globals on, it's just down to laziness really, and the script is encoded so you can't even fix it for them.

    Observe :

    http://www.corephp.co.uk/archives/19-Prepare-for-PHP-6.html
     
    krakjoe, Jun 6, 2007 IP
  10. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #10
    fugg that. lazy fools.
     
    ansi, Jun 6, 2007 IP