Problems with fastcgi php migration

Ian M. Evans ianevans at
Sun Mar 16 14:46:25 MSK 2008

Thomas wrote:
> Could you post the final and complete configuration file for the php
> section so we can have a global look at it? That might save days of
> work for other people in the future.
> Glad you could sort it out 100%.

Will do. The only thing I'm still noticing is the possible issue with 
scripts that use $_SERVER['PHP_SELF'].

If a .php (or in my case, .shtml as well) file is called it equals the 
filename e.g. _SERVER["PHP_SELF"] = /test.php

If an extensionless file (in this case 'test') is called, 
_SERVER["PHP_SELF"] = no value

This is a bit of an issue for things like forms scripts or pagination 
scripts that use _SERVER["PHP_SELF"].

Obviously, I can rewrite my own stuff to not need _SERVER["PHP_SELF"], 
but for people who might look for a drop in solution or are using a 
cut'n'paste script, it might be a problem.

If anyone has an idea why the extensionless files aren't creating 
_SERVER["PHP_SELF"] or a way to create it, please let us know.


More information about the nginx mailing list