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 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 serverfault.com/questions/69150/… –  Dennis Williamson Oct 6 '09 at 8:56

1 Answer 1

up vote 1 down vote accepted

See http://bugs.php.net/bug.php?id=45114

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

 
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.