Results 1 to 12 of 12
  1. #1

    php handler cgi and register_globals

    On my server (cpanel/whm php version 5) I need phpsuxec enabled so Configure Suexec and PHP I have suxec as on and php handler as cgi.

    The problem is that enabling of register_globals through .htaccess file of cpanel accounts is not working. I have tried all kinds of commands as:

    php_flag register_globals on

    and even tried creating a php.ini register_globals=on

    and that still does not enable register_globals on an account. I do not want to enable register_globals centrally as I am aware that is a security threat.

    But if I change to dso php handler that .htaccess code enables register_globals but then phpsuexec is not working.

    Is there anyway to combine these two options?

    Thank you for your suggestions.

  2. #2
    Join Date
    Jan 2008
    Location
    St. John's, NL
    Posts
    2,114
    Try creating a .htaccess file with the following:

    Code:
    php_value register_globals 1
    "php_flag register_globals on" does not work for Apache 2/PHP 5, just to let you know.
    Last edited by larwilliams; 03-04-2008 at 08:25 PM. Reason: added detail
    Cpanel/WHM PHP Perl Ruby Full Time Support
    LCWSoft - Canada web hosting (based in Newfoundland) since 2007
    Servers based in the US and Canada (Uptime Report)

  3. #3
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    8,910
    Technically register_globals=on in a php.ini file *should* work if you're running PHP as a CGI (suEXEC). Have you created a phpinfo() file under the account to confirm that register_globals is not being enabled?

    <?
    phpinfo();
    ?>
    If you can confirm that it's not being enabled, where did you put the php.ini file, the root directory (public_html) or a subdirectory?
    Patrick William | RACK911 Labs | Software Security Auditing
    400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com

    www.HostingSecList.com - Security notices for the hosting community.

  4. #4
    Quote Originally Posted by Pat H View Post
    Technically register_globals=on in a php.ini file *should* work if you're running PHP as a CGI (suEXEC). Have you created a phpinfo() file under the account to confirm that register_globals is not being enabled?



    If you can confirm that it's not being enabled, where did you put the php.ini file, the root directory (public_html) or a subdirectory?
    Yes, register_globals are disabled in the main php ini on the server.

    For the php.ini, I have put it in the public_html folder and that did not help so I also put it in the directory of where the link is located that is showing that register_globals are disabled and that also did not remove the error.

  5. #5
    Quote Originally Posted by larwilliams View Post
    Try creating a .htaccess file with the following:

    Code:
    php_value register_globals 1
    "php_flag register_globals on" does not work for Apache 2/PHP 5, just to let you know.
    I tried your code php_value register_globals 1 and it does not help as well.

  6. #6
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    8,910
    Login to WHM and click on "Configure PHP and SuExec" and confirm that suPHP is set as the handler for PHP5. If it's not, enable it in the drop down box below and proceed with caution.

  7. #7
    Join Date
    Jan 2008
    Location
    St. John's, NL
    Posts
    2,114
    Quote Originally Posted by host_20072008 View Post
    Yes, register_globals are disabled in the main php ini on the server.

    For the php.ini, I have put it in the public_html folder and that did not help so I also put it in the directory of where the link is located that is showing that register_globals are disabled and that also did not remove the error.
    Please try the solution I posted above...
    Cpanel/WHM PHP Perl Ruby Full Time Support
    LCWSoft - Canada web hosting (based in Newfoundland) since 2007
    Servers based in the US and Canada (Uptime Report)

  8. #8
    Quote Originally Posted by Pat H View Post
    Login to WHM and click on "Configure PHP and SuExec" and confirm that suPHP is set as the handler for PHP5. If it's not, enable it in the drop down box below and proceed with caution.
    As php 5 handlers I only have dso, cgi and none in the drop down menu. I do not have suPHP listed there.

  9. #9
    Quote Originally Posted by larwilliams View Post
    Please try the solution I posted above...
    Thanks for you suggestion, but I have tried you code (php_value register_globals 1) and it is not helping.

  10. #10
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    8,910
    Quote Originally Posted by host_20072008 View Post
    As php 5 handlers I only have dso, cgi and none in the drop down menu. I do not have suPHP listed there.
    Ah, you will have to run Apache Update from within WHM and enable it. My original reply should have been suPHP and not suEXEC, as suEXEC is different from what was once known as PHP suEXEC but is now called suPHP.

  11. #11
    So Mod SuPHP is the php suxec support? I know that before in the apache update there was an option to select phpsuxec but on the new version in whm there is no link like that is apache update.

  12. #12
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    8,910
    Quote Originally Posted by host_20072008 View Post
    So Mod SuPHP is the php suxec support? I know that before in the apache update there was an option to select phpsuxec but on the new version in whm there is no link like that is apache update.
    That is correct.

    It's my understanding that phpSUEXEC was a custom project built for cPanel, whereas suPHP is an independent open source project.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •