2

is there some sort of .htaccess directive. I dont have access to httpd.conf.

I have php5 in a fastcgi/cgi module.

Multiple domains.

But for some reason all the domains are pointing to the first domains php.ini (the one I installed php with in the script)

not sure if that got compiled into the build, or if theres some setting I can change someplace

thanks much!

qodeninja
  • 2,753
  • 10
  • 32
  • 33

2 Answers2

3

You can do that in the handler script by setting PHPRC variable :

#!/bin/sh
PHPRC="/path/to/custom/php.ini"
export PHPRC
PHP_FCGI_CHILDREN=5
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/local/php5/bin/php-cgi

Then you need to set up one different handler per domain (if you want a different php.ini)

Julien
  • 510
  • 1
  • 5
  • 11
0

You can't using php as an apache's module.
If you want to have a per domain configuration at such a level of flexibility you should configure PHP to be run as a fast CGI.

In this case I suggest lighthttpd + PHP-CGI, this is a possible tutorial.

EDIT: @Julien Tartarin explained his way to achieve the goal in apache, but I suggest you to not be over-headed by apache's weight, if you don't need other apache's powerful modules there is no reason to use it with PHP as a FAST CGI.

drAlberT
  • 10,949
  • 7
  • 39
  • 52