English 中文(简体)
Zend Server and auto_prepend_file (or php_value)
原标题:

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

问题回答

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





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签