<div dir="ltr"><div class="gmail_extra"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">​​</div>On Mon, Mar 3, 2014 at 10:11 PM, talkingnews <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us">nginx-forum@nginx.us</a>></span> wrote:<br>

<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This page <a href="http://wiki.nginx.org/PHPFcgiExample">http://wiki.nginx.org/PHPFcgiExample</a> says<br>


"This guide run fine on php.ini cgi.fix_pathinfo = 1 (the default). Some<br>
guide insist to change it to cgi.fix_pathinfo = 0 but doing that make<br>
PHP_SELF variable broken (not equal to DOCUMENT_URI).".<br></blockquote><div><br><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">To know what cgi.fix_path_info does ​depending on its value, rely on <a href="http://php.net/manual/en/ini.core.php#ini.cgi.fix-pathinfo">core php.ini documentation</a>.<br>

</div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">The default value of '1' fixes an erroneous behavior of earlier PHP versions not using PHP_INFO information properly. THe '0' value seems to exist for backward-compatibility as it provides a broken environment.<br>

</div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">Thus, scripts relying on such a value are highly suspicious to my eyes. Where does the 'sites-available' directory of nginx came from? I do not have such one (using Debian official stable package, currently 1.4.5).<br>

</div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline"><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">Besides, there is no such DOCUMENT_URI server variable in PHP (at least as of 4.1.0 as <a href="http://php.net/manual/en/reserved.variables.server.php">the list of PHP server variables</a> states and I wonder if it had ever existed before).<br>

</div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">Another note: what the wiki says is not exact, refer to PHP documentation to know the real impact of PHP configuration directives (sounds obvious...).<br>

</div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline"><br>The nginx wiki has not the reputation of being a trustable source of information. Prefer referring to the official documentation, either nginx or PHP one.<br>

<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

My second question: As I understand it, you should always make parameter<br>
changes only where they are needed, and in an overriding way - ie: one never<br>
touches php.ini itself.<br></blockquote><div><br><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">​Well, changing php.ini file modifies the behavior for all scripts using it. If you have multiple environments needing different specific settings, then it is indeed safer to configure them on-the-fly through FastCGI parameterization of nginx. Thus, basing all your different configurations on top of the default one is a rather straightward way of doing it.<br>

</div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">Moreover, when updating PHP packages between major versions, its default configuration files​</div> <div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">

​usually also change. When you will wish to ​test your production setup for an upgrade, you will be happier if you are as close to the original files as possible.<br><br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


But the Pitfalls guide suggests this is dangerous.<br></blockquote><div><br><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">​What exactly are you referring to in the pitfalls page saying that you setup is dangerous?​</div>

 </div></div><font size="1"><span style="color:rgb(102,102,102)">---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font>
</div></div>