Hi, I just tried a few modifications for fcgi as apache handler and thereby I found something that might be interesting for you.
For giving every account its own php.ini, I made the following.
1. Make a
backup of your files
2. Within the accounts
public_html folder put a
.htaccess file with the following lines in it:
PHP Code:
AddHandler php5-fastcgi .html
Action php5-fastcgi /cgi-bin/php5.fcgi
3. Move to the
cgi-bin folder within your accounts
public_html folder and add two files.
--First one is the copy of your
php.ini with your modifications
--The second file name
php5.fcgi and add the following lines in it:
PHP Code:
#!/bin/sh
export PHP_FCGI_CHILDREN=1
export PHP_FCGI_MAX_REQUESTS=10
exec /usr/local/cpanel/cgi-sys/php5
4.Go to
usr/local/apache/conf/php.conf and put the following lines in that file:
PHP Code:
# This file was automatically generated by the Cpanel PHP Configuration system
# If you wish to change the way PHP is being handled by Apache on your system,
# use the /usr/local/cpanel/bin/rebuild_phpconf script or the WHM interface.
#
# Manual edits of this file will be lost when Apache is updated.
# This file was automatically generated by the Cpanel PHP Configuration system
# If you wish to change the way PHP is being handled by Apache on your system,
# use the /usr/local/cpanel/bin/rebuild_phpconf script or the WHM interface.
#
# Manual edits of this file will be lost when Apache is updated.
# Fastcgi configuration for PHP5
LoadModule fcgid_module modules/mod_fcgid.so
MaxRequestsPerProcess 500
MaxProcessCount 1000
DefaultMaxClassProcessCount 100
IPCConnectTimeout 60
IPCCommTimeout 60
PHP_Fix_Pathinfo_Enable 1
IdleTimeout 900
IdleScanInterval 120
BusyTimeout 300
BusyScanInterval 120
ErrorScanInterval 9
ZombieScanInterval 9
ProcessLifeTime 3600
AddHandler php5-fastcgi .php
Action php5-fastcgi /cgi-bin/php5.fcgi
AddType application/x-httpd-php .php
# End of autogenerated PHP configuration.
So thats it and works fine for me. All you have to do is to add that files to all you accounts to make it work.
Also be careful of the
chmod you are giving to the
php.ini for example. Depending if you wish to make your customers able to change it or if you just want to be the only one to administrate it.
Only be careful, if you recompile or update your apache, the php.conf file will be overwritten and you have to rework it.
Hope it helps.