From: Whit B. <wh...@tr...> - 2004-05-17 03:29:21
|
On Mon, May 17, 2004 at 01:17:59AM +0200, Reini Urban wrote: > No this is indented behaviour with CGI now. Your hoster will not change > it, that's the new default setup for CGI. > > We have to find a way around it. Thanks for bringing this to our attention. Reini, There used to be no PATH_INFO for CGI (as I read the explanations), then they fixed it, then they set the default in php.ini to not use the fix, since that could break some old scripts looking for a related variable. So the present technique would have never worked on PHP as CGI, then would have briefly worked (since php.ini defaulted to use it at first), then would have ceased working as he reports for just those cases where php.ini isn't intentionally set to use the fix. (Without the fix, both ORIG_PATH_INFO and PATH_INFO should be empty without the fix, given a CGI PHP.) So yeah you can't depend on the fix being there or not. Maybe the way he found of using the phpinfo() function is a way around it? Think you could use ini_get('cgi.fix_pathinfo') to test if the fix is set - although you'd really want to check if it's even running as CGI first, not sure how. I imagine at some point the PHP crew will change the default back again to the fixed state, since that would bring this into conformance with the CGI standard, which they're a bit concerned with. Whit |