The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php modification for register_globals

Discussion in 'General Discussion' started by asmithjr, Jul 23, 2008.

  1. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    with this new server I am unable to use modifications in the .htaccess to turn register_globals on or off.

    in my php.ini I have register_globals = Off but 1 website needs them On

    I keep getting a 500 error when I add php_flag register_globals on to the .htaccess file

    The php_flag register_globals on in the .htaccess works fine on my old server runing PHP4

    Is there something I missed in my php.ini ?
     
  2. linux7802

    linux7802 Well-Known Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Solution

    It could be possible that you are misspelled code in .htaccess file. Rename the .htaccess file and recreate the .htaccess filw with following content

    php_flag register_globals On

    If you are still facing the problem then it seems to be that your new server running PHPSUEXEC, this means PHP executes as the "real user". In this case remove any references to register_globals in your .htaccess files and create a file called php.ini in this file put the following:

    register_globals = On

    It will solve your problem :)
     
  3. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    I really should have put this information in before but I've tried both the .htaccess method you mentioned and the php.ini.

    I have a php.ini file in the users Home /home/user/public_html that contains register_globals = On and at least there is no 500 page error as the .htaccess file gives but the website just gives a blank page still.
     
  4. linux7802

    linux7802 Well-Known Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Solution

    In that case you need to check the server logs for your domain.

    Login into your server (ssh)

    and copy and paste the error logs if you are not able to sort out it.
     
Loading...

Share This Page