0

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/example.com/httpdocs>
    php_admin_flag engine on
    php_admin_value open_basedir "/var/www/vhosts/example.com/httpdocs:/var/www/vhosts/drupal:/tmp"
</Directory>

customize the open_basedir just for the example.com 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?

1 Answer 1

0

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 http://www.fastcgi.com/drupal/node/5?q=node/10 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .