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!

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:
    85
    Likes Received:
    0
    Trophy Points:
    56
    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:
    166
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. golden_eyes

    golden_eyes Well-Known Member

    Joined:
    Aug 9, 2010
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    56
    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:
    166
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. golden_eyes

    golden_eyes Well-Known Member

    Joined:
    Aug 9, 2010
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    56
    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:
    166
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. golden_eyes

    golden_eyes Well-Known Member

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

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