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 managed to get the custom INI to load, but its still loading other .ini files from the default location.

I created an fcgi wrapper that passed the ini value as a parameter. That worked. Now just these other ini's need to be loaded from the same dir as my custom ini.

The problem is the other .ini files are overriding the settings in my custom php.ini =/

I realize the problem now is that the php.fcgi was compiled with a custom path parameter. So that's a problem. I might have to recompile it using a different location or none at all. I'd hate to have to compile an fcgi for each domain =/

share|improve this question
Please post the solution for loading the custom INI as an answer to the question at… – Dennis Williamson Oct 6 '09 at 8:56
up vote 1 down vote accepted


Suppose you have a php5.fcgi and a /home/domain/fcgi-bin/php.ini you want to load

In your php5.fcgi change the exec line to sth like

exec /usr/bin/php-cgi -n -c /home/domain/fcgi-bin/php.ini

(you may need to change the php-cgi executable path depending on where your distro has it. This example is for debian)

-n disables all php.ini files so that no other php file will load and -c sets the php file you want to load

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.