Custom settings with PHP

Ian Hobson ian at ianhobson.co.uk
Tue Jul 12 17:40:42 MSD 2011


On 09/07/2011 23:59, locojohn wrote:
> Igor Sysoev Wrote:
> -------------------------------------------------------
>> On Fri, Jun 18, 2010 at 08:23:16AM -0400, jbruni
>> wrote:
>>
>>> [b][color=#FF0000]UPDATE[/color][/b]
>>>
>>> Now, it is possible to do this way:
>>>
>>> [code]
>>> fastcgi_param  PHP_VALUE
>> "upload_max_filesize=5M";
>>> [/code]
>>>
>>> More information here:
>>> http://bugs.php.net/bug.php?id=51595
>>>
> Igor, how about using the current values of PHP_INI* variables inside
> the definition e.g.:
>
>
This is impossible. Think about what nginx does - It matches filenames 
to a mask and passes the request using CGI to the port defined on a match.

There is no reason why Nginx should know the CGI server is php (It is 
only convention that php files end in .php) and no reason why it should 
be php
either - it might be Ruby, Python, Erlang, or anything else you might 
use.  Further there is no way it can determine which  php.ini file it 
would have to read even if it could know it was a php configuration it 
had to find.

Ian







More information about the nginx mailing list