PHP configuration options in httpd.conf with suPHP
If you’ve tried to set any of the following while using suPHP, you know how frustrating it can be because there’s no support for these options in suPHP, so there’s no support to change these settings for specific VirtualHost entries Here’s the solution.
- php_flag
php_admin_valuephp_admin_flag
You’ll have to have one server php.ini for each virtual server you want to change these settings on.
First, figure out which php.ini suPHP is using. To do this put <?php phpinfo( ); ?> in a .php file on your site and then open that URL in your browser and search for “ini”.
Second, copy that php.ini to a location for your site: cp /usr/local/lib/php.ini /some/path/php.ini
Third, edit the php.ini to suite your needs.
Fourth, in the VirtualHost for the site you are wanting to use those values, put this:
<IfModule mod_suphp.c>
suPHP_ConfigPath /some/path/php.ini
</IfModule>
Restart apache and away you go!
php_admin_flag
December 12th, 2009 at 6:59 pm
Super post, Need to mark it on Digg