Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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/mod_fcgid.so
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

1 Answer 1

up vote 0 down vote accepted

You can create a simple shell wrapper like this :

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

exec /usr/local/cpanel/cgi-sys/php5 --php-ini /path/to/php-custom.ini "$@"
(EOF)
# 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
</VirtualHost>
share|improve this answer

Your Answer

 
discard

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.