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.

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

    Joined:
    Oct 27, 2005
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    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

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

    Code:
    <VirtualHost 00.00.00.00:80>
      .
      .
      php_admin_flag safe_mode Off
      php_admin_flag register_globals On
    </VirtualHost>
    
    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

    Joined:
    May 21, 2003
    Messages:
    291
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Acequias :: Granada :: España
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    That don't work... if Apache + CGI or Apache + FCGID it's system compiled with easyapache

     
  4. apscinsspl

    apscinsspl Well-Known Member

    Joined:
    Mar 15, 2008
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    16
    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
     
Loading...

Share This Page