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.

how to configure the apache to support overite the php.ini and .htaccess

Discussion in 'EasyApache' started by golden_eyes, Apr 14, 2011.

  1. golden_eyes

    golden_eyes Well-Known Member

    Joined:
    Aug 9, 2010
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    I have a server wont work the .htaccess and php.ini what I supposed to do in order to be supported? please note that the suphp is enabled.

    Sincerely,
     
  2. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    You cannot use php_value/php_flag settings in the .htaccess file with SuPHP. You must use a user-level php.ini in the public_html/ of the account to define your custom settings.
     
  3. golden_eyes

    golden_eyes Well-Known Member

    Joined:
    Aug 9, 2010
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    which php handler you suggest to use between DSO, CGI instead of the suphp? as I know the suphp is more secured.

    PHP through mod_suphp. Using this option is probably the most flexible way of serving PHP requests and is generally very secure.
    Apache PHP Request Handling
    I'm Confused now please advice..
     
  4. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    SuPHP is probably the best for cPanel environments. With it, you just need to tell users to user their own php.ini files for custom settings, pretty simple. :)

    E.g. /home/cpuser/public_html/php.ini
     
  5. golden_eyes

    golden_eyes Well-Known Member

    Joined:
    Aug 9, 2010
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    the php.ini should be placed in the public_html or it can be in any folder? Please note that the Current Configuration

    Option Configured Value
    Default PHP Version (.php files) 5
    PHP 5 Handler suphp
    PHP 4 Handler cgi
    Apache suEXEC on
     
  6. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    It can be placed in a subdirectory of public_html/ but it will only affect the PHP settings for that directory and those below it.
     
  7. golden_eyes

    golden_eyes Well-Known Member

    Joined:
    Aug 9, 2010
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    so it high recommended to be in public_html instead of directories?
     
Loading...

Share This Page