Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i have a dev server (debian) managed via Plesk (9.5.2).

Im wondering if is possible to change the php.ini settings for a single host while PHP is running as FastCgi/CGI application.

If i run PHP as apache module, i can do it via vhost.conf, for example:

<Directory /var/www/vhosts/>
    php_admin_flag engine on
    php_admin_value open_basedir "/var/www/vhosts/"

customize the open_basedir just for the domain, but works only if i run php as apache module; for others motivations, i need php as a FastCGI/CGI.

I cant edit directly the php.ini, becose this would affect all my domains.

Any idea?

share|improve this question
up vote 0 down vote accepted

The PHP manual specifies where you can change each directive.

As far as using ini_set or .htaccess you may be out of luck, as according to the docs:

php_admin_value name value Sets the value of the specified directive. This can not be used in .htaccess files. Any directive type set with php_admin_value can not be overridden by .htaccess or ini_set(). To clear a previously set value use none as the value.

You might be able to fudge it by writing a script in your CGI directory which sets environment variables, and then starts PHP, instead of invoking PHP directly. This is detailed at and provides the following pointer for more info:

The README.FastCGI file, located in the PHP source, provides additional details on these and some other useful variables.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.