Bug #576
QUERY_STRING not set through the 404 error handler using fcgi
| Status: | Invalid | Start: | ||
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | core | |||
| Target version: | - | |||
| Pending: | No |
Resolution: | invalid |
|
| Patch available: |
Description
When using the 404 error handler, and pointing it to a php file (over fcgi), the QUERY_STRING is set to an empty string. This is tested in both 1.4.8 and 1.4.11.
-- timo
History
03/29/2006 03:44 PM - andrewlkho
I've also verified this with lighttpd 1.4.11 using PHP 5.0.4 over FastCGI. $_GET is also blank -- I don't know where PHP gets that from, but I'd assume they're related.
Jan, do you want any more information (such as a strace)?
04/19/2006 01:49 PM - andrewlkho
Actually, is this deliberate or a bug? REQUEST_URI is set, so it's possible to obtain QUERY_STRING from that. Jan?
08/08/2006 08:54 PM - Anonymous
In case somebody stumbles on this, this did the trick for me:
function fix_querystring() {
if (!strstr($_SERVER'REQUEST_URI','?')) return;
$_SERVER'QUERY_STRING' = preg_replace('#^.*?\?#','',$_SERVER'REQUEST_URI');
parse_str($_SERVER'QUERY_STRING', $_GET);
}
08/09/2006 09:59 AM - andrewlkho
According to this, this is actually deliberate, so you can close this ticket.