Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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'm using cPanel on centos5 64bit installed.

PHP handler is : fcgi

cat /usr/local/apache/conf/php.conf output is :

LoadModule fcgid_module modules/
MaxRequestsPerProcess 500
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php5
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php4
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php3
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php2
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .phtml
AddHandler fcgid-script .php5 .php4 .php .php3 .php2 .phtml

Apache/2.2.22, PHP 5.2.17

How can i use custom php.ini for a specific account?

share|improve this question
up vote 0 down vote accepted

You can create a simple shell wrapper like this :

# cat > /usr/local/cpanel/cgi-sys/php5-custom

exec /usr/local/cpanel/cgi-sys/php5 --php-ini /path/to/php-custom.ini "$@"
# chmod +x /usr/local/cpanel/cgi-sys/php5-custom

Then in a specific context, like a virtualhost, override the fcgiwrapper for the type you need :

<VirtualHost *:80>
  FCGIWrapper /usr/local/cpanel/cgi-sys/php5-custom .php
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.