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.

htaccess php_*

Discussion in 'General Discussion' started by ghostsniper007, Apr 2, 2007.

  1. ghostsniper007

    Joined:
    Mar 31, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    Does cpanel or apache provide a method for what is and isn't allowed to be put in the .htaccess files of users in regards to php_flag and php_value ?

    Thanks,
    G.
     
  2. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    That is not a function of Cpanel or Apache but rather PHP itself.

    The main details about PHP configuration settings and their available
    override levels can be obtained from the PHP site at http://www.php.net

    Now with that said, if you are running either SuPHP or PhpSuExec then
    you won't be able to put any "php" override commands in .htaccess
    as doing so will just generate an error 500 condition.
     
  3. david510

    david510 Well-Known Member

    Joined:
    Aug 22, 2004
    Messages:
    473
    Likes Received:
    0
    Trophy Points:
    16
    If php is running as cgi, make a file named php.ini inside the folder where you need the php value overridden and save the file.
     
  4. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Slight technical correction to what david510 said ...

    (should read) "If php is running as phpSuExec ...."

    Running as a CGI in itself won't allow for custom php.ini files
    but running with phpSuExec (which also runs as a CGI) does.

    SuPHP runs primarily as CGI as well but doesn't permit user php.ini files

    I know what david510 meant -- just clarifying his statement for everyone. ;)
     
  5. david510

    david510 Well-Known Member

    Joined:
    Aug 22, 2004
    Messages:
    473
    Likes Received:
    0
    Trophy Points:
    16
    good one Spiral :)
     
Loading...

Share This Page