1

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 =/

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89
qodeninja
  • 2,753
  • 10
  • 32
  • 33
  • Please post the solution for loading the custom INI *as an answer* to the question at http://serverfault.com/questions/69150/how-do-i-get-linux-server-to-use-local-php-ini-in-a-shared-environment – Dennis Williamson Oct 06 '09 at 08:56

1 Answers1

1

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

Vagelis K
  • 26
  • 1