views:

216

answers:

1

Hi
On our development PC we need to have a prepend file (loaded via auto_prepend_file in php.ini) to set up severals paths. This prepend.php file is used on all of our server and help us to easily configure all applications.

But the Zend Server 5 GUI (http://localhost:10081/ZendServer/) does not work when auto_prepend_file is set, and Apache does not accept php_value directive, either in htaccess or httpd.conf files (because of FastCGI).

Do you have any idea to have a prepend file for our code, but not for ZS GUI?

Best regards,
Cédric

+1  A: 

http://php.net/manual/en/configuration.file.php says:

php.ini is searched in these locations (in order):

. . .

You can review this list and see if one of the techniques helps in your case. For example, you can set the environment variable PHPRC, or you can put a different php.ini file in each current working directory, assuming each virtual host has a distinct cwd.

Note that when using Apache and mod_php, or other module embedding PHP in the web server (e.g. FastCGI), the php.ini file is read once, at web server startup. When you use PHP in a CGI manner, the php.ini file is read during every web request, so you have more opportunity to use a different php.ini

Pentium10
I try a SetEnv PHPRC "E:\Program Files\Zend\ZendServer\etcgui"but it does not work. ZendServer have an xml config file with a PHPRC setup, but I cannot override it or select xml file for one vhost.
Cédric Girard