Need help on Register Globals... Urgent !!

Discussion in 'PHP' started by smrutik, Mar 12, 2009.

  1. #1
    hi,

    I am getting error on server as:
    FATAL ERROR: register_globals is disabled in php.ini, please enable it!

    I tried ini_set('register_globals', 'on');
    ini_set('register_globals', true); in config and index.php files.

    Also, i changed the htaccess file as:
    <IfModule mod_php5.c>
    php_value register_globals 1
    </IfModule>

    But still it is showing the same error.

    What can be the solution? What should I do?

    thanks,
    Smruti
     
    smrutik, Mar 12, 2009 IP
  2. Traffic-Bug

    Traffic-Bug Active Member

    Messages:
    1,866
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    80
    #2
    This occurs in OScommerce for templates that are too old. Simply comment the lines in application_top.php in includes directory. You need to set register_globals in php.ini like this
    register_globals = On
     
    Traffic-Bug, Mar 12, 2009 IP
  3. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The correct solution is to fix your application so that it does not depend on register_globals. Use of register_globals constitutes egregious malpractice.
     
    SmallPotatoes, Mar 12, 2009 IP
  4. smrutik

    smrutik Guest

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    hi Traffic-Bug,

    thanks a lot for your reply, my application is using the OSComm... it worked! :)
     
    smrutik, Mar 12, 2009 IP