I am migrating from Apache and we use a lot of custom frameworks. I need to be able to define an include_path for PHP on a per vhost basis. In Apache I would use the php_value or php_flag directives in the vhost definition seeing that I was using the Apache module. However, what is the equivalent for FastCGI? I tried putting a php.ini in the root of my vhost's directory with my include_path value, but it seems it is not being parsed. Any ideas?
on 28.01.2008 22:12
on 29.01.2008 14:32
Chip Burke wrote: > I am migrating from Apache and we use a lot of custom frameworks. I need > to be able to define an include_path for PHP on a per vhost basis. In > Apache I would use the php_value or php_flag directives in the vhost > definition seeing that I was using the Apache module. However, what is > the equivalent for FastCGI? I tried putting a php.ini in the root of my > vhost's directory with my include_path value, but it seems it is not > being parsed. Any ideas? Try starting PHP with the "-c" commandline param, passing the path to your PHP.ini. Try this within you $HTTP["host"] conditional: "bin-path" => "/path/to/php -c /path/to/php.ini", This way, you can have your own php.ini für each V-Server.
on 29.01.2008 15:49
Bruno Baketaric wrote: > Try this within you $HTTP["host"] conditional: > "bin-path" => "/path/to/php -c /path/to/php.ini", > > This way, you can have your own php.ini für each V-Server. Doesn't this only apply to CGI?
on 29.01.2008 15:57
Olaf van der Spek wrote: > Bruno Baketaric wrote: >> Try this within you $HTTP["host"] conditional: >> "bin-path" => "/path/to/php -c /path/to/php.ini", >> >> This way, you can have your own php.ini für each V-Server. > > Doesn't this only apply to CGI? I don't knwo as I couldn't get this to work at all. What I finally did was use htscanner and it works like a charm.
on 30.01.2008 16:29
Chip Burke wrote: > I don't knwo as I couldn't get this to work at all. What I finally did > was use htscanner and it works like a charm. or not... it seems it sets global settings...
on 31.01.2008 08:21
on 01.05.2008 16:25
Chip Burke wrote: > Chip Burke wrote: > >> I don't knwo as I couldn't get this to work at all. What I finally did >> was use htscanner and it works like a charm. > > or not... it seems it sets global settings... you can make something like this : $HTTP["host"] =~ "^(www\.)?sub.yourdomain.com$" { #what you need for vhost fastcgi.server = ( ".php" => (( "bin-path" => "/usr/bin/php5-cgi -d include_path=.:/yourincludepath/lib", "socket" => "/tmp/php2.socket" ))) #with socket is not the same of global settings (/tmp/php.socket in global setting) }

