Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Unable to make local register globals on while safe mode is on

Discussion in 'General Discussion' started by cemlouis, Mar 17, 2008.

  1. cemlouis

    cemlouis Member

    Oct 27, 2005
    Likes Received:
    Trophy Points:

    I checked the previous posts for register globals that are previously posted in the forum but no results with the safemode is on.

    We are running php in cgi mode with phpsuexec enabled. I uploaded a php.ini file like below:

    register_globals = On

    When I run phpinfo() both local and master values are off. I know editing httpd.conf is useless in cgi mode but I also tried -> no results. It is ok with dso but nothing happens in cgi mode. On the other hand when I edit the .htaccess server gives 500 internal server error.

    Are there any way to register globals on for just 1 domain name with the master php.ini in here: /usr/local/lib/php.ini
    Because I think the local php.ini is not functioning due to safe mode is on for php.

    We are not using globals in our own scripts but we are running a 4 year old, third party invoicing script which needs them.

    Actually we are desperate and need help,
    Thank you,
  2. mctDarren

    mctDarren Well-Known Member

    Jan 6, 2004
    Likes Received:
    Trophy Points:
    New Jersey
    cPanel Access Level:
    Root Administrator
    Try adding the directives to the Apache config file (httpd.conf) like this:

      php_admin_flag safe_mode Off
      php_admin_flag register_globals On
    Obviously you need to put your IP where the zeroed one is, and the dots leading to the admin_flag lines indicate skipping to the bottom - right before the closing </VirtualHost> line.
  3. speckados

    speckados Well-Known Member

    May 21, 2003
    Likes Received:
    Trophy Points:
    Pastrana :: Guadalajara :: España
    cPanel Access Level:
    DataCenter Provider
    That don't work... if Apache + CGI or Apache + FCGID it's system compiled with easyapache

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. apscinsspl

    apscinsspl Well-Known Member

    Mar 15, 2008
    Likes Received:
    Trophy Points:
    For the DSO, it will not allow changes of register_globals due to the way the admin access to modify those settings are set. Basically, if it is On, you can turn it off, but if it is off, you cannot turn it on. It is more of security design for it under DSO. However, under suPHP, you can set your own php.ini configuration to govern the script since it will pass the php.ini variable to the PHP when it process your pages to display the results for it.

    The best way of doing this is to compile and enable suPHP and then uncomment
    this line in your .htaccess file.

    suPHP_ConfigPath /home/maruggio/public_html/php.ini

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice