Yeah - I'm sure that's what's going on, but I'm not really familiar with the code.
It's definitely a bug somewhere in splitting the pathinfo. Changing the filename or subdirectory location gives consistent results. There's always XX characters added to the beginning of _ENV["SCRIPT_NAME"] where XX is equal to the length of pathinfo. It's almost like the code is removing pathinfo length twice. Jaime Bozza From: Oli Warner [mailto:[email protected]] Sent: Monday, March 30, 2009 11:13 AM To: Jaime Bozza Cc: [email protected] Subject: Re: [Cherokee] PHP/Cherokee Problem - SCRIPT_NAME/PHP_SELF (I think) I can confirm this bug... I think I've actually informally reported it the mailing list before. I was doing stuff with PHP headers and the amount shown of one of them was directly related to the length of the URL. Problem is I can't for the life of me remember the exact details I can't even find the email, so perhaps I'm imagining that I ever wrote it... But I do know this does happen and I imagine it has something to do with the header translation code that uses string lengths to subsect out values. 2009/3/30 Jaime Bozza <[email protected]> Hello, Looking at switching to Cherokee and I'm running into a strange issue with some of the PHP variables. Default install, 0.99.7 with php-cgi. Document root is /usr/local/www/cherokee/ I have a test.php file that just calls phpinfo(); so I can test functionality. If I call http://127.0.0.1/test.php I get the following: _SERVER["DOCUMENT_ROOT"] = /usr/local/www/cherokee/ _SERVER["SCRIPT_NAME"] = /test.php _SERVER["PHP_SELF"] = /test.php This is correct. But, if I call http://127.0.0.1/test.php/more I get the following: _SERVER["DOCUMENT_ROOT"] = /usr/local/www/cher _SERVER["SCRIPT_NAME"] = rokee/test.php _SERVER["PHP_SELF"] = rokee/test.php/more It seems that the variables get shifted by the number of characters after the script. For instance, calling http://127.0.0.1/test.php/a/b/c/d shows: _SERVER["DOCUMENT_ROOT"] = /usr/local/www/c _SERVER["SCRIPT_NAME"] = cherokee/test.php _SERVER["PHP_SELF"] = cherokee/test.php/a/b/c/d /a/b/c/d = 8 characters, all three above variables get shifted by 8 characters. Other variables (PATH_INFO, SCRIPT_FILENAME, etc) all seem to be correct. I'm currently using lighttpd with spawn_fcgi to compare. I also noticed that _ENV["DOCUMENT_ROOT"] is also /usr/local/www/c (last example), so I think it's coming from there. Ideas on what might be happening? Sincerely, Jaime Bozza _______________________________________________ Cherokee mailing list [email protected] http://lists.octality.com/listinfo/cherokee
_______________________________________________ Cherokee mailing list [email protected] http://lists.octality.com/listinfo/cherokee
