ID: 13316 Updated by: sterling Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: URL related Operating System: Windows 2000 SP1 PHP Version: 4.0.6 New Comment:
This is a limitation of CGI, plain and simple. Previous Comments: ------------------------------------------------------------------------ [2001-10-15 19:59:57] [EMAIL PROTECTED] If you install PHP as CGI under apache you would typically put: Action php-script /cgi-bin/php AddHandler php-script .php in httpd.conf. If I put: Action printenv-cgi-script /cgi-bin/printenv.pl AddHandler printenv-cgi-script .pe I get the following for request: http://host/test.pe/test PATH_INFO="/test.pe/test" PATH_TRANSLATED="/home/ek/projects/test.pe/test" REQUEST_URI="/test.pe/test" SCRIPT_FILENAME="/home/ek/projects/apache/cgi-bin/printenv.pl" SCRIPT_NAME="/cgi-bin/printenv.pl" How am I supposed to guess that I should open /home/ek/projects/test.pe for processing? ------------------------------------------------------------------------ [2001-10-15 19:42:26] [EMAIL PROTECTED] How is that a limitation of the CGI protocol? It works with Perl as a cgi: http://localhost/cgi-bin/printenv.pl/1 Or is that some how different because it is within the cg-bin directory? Perl is being run as a cgi, not a module. These are outputted from printenv.pl: PATH_INFO="/1" PATH_TRANSLATED="c:\www\1" REQUEST_URI="/cgi-bin/printenv.pl/1" SCRIPT_FILENAME="c:/www/cgi-bin/printenv.pl" SCRIPT_NAME="/cgi-bin/printenv.pl" ------------------------------------------------------------------------ [2001-10-15 17:42:31] [EMAIL PROTECTED] It is not possible to handle such requests due to the limitiations of CGI protocol. PHP will not crash, it will just output: Fatal error - Unable to open /site/root/script.php/1 which is not valid response and thus the error message. It's probably better that way than to reveal the full path of the script in question. If you really want that functionality install PHP as web server module. ------------------------------------------------------------------------ [2001-09-17 09:34:59] [EMAIL PROTECTED] I can conform this also occurs on linux 2.2.19. Best regards, Andrew ------------------------------------------------------------------------ [2001-09-15 05:46:35] [EMAIL PROTECTED] I am using the binary from this site. Anytime I access a PHP script with any characters after a / after the script name, it gives me an internal server error 500 and says "Premature end of script headers: c:/php/php.exe" in the error log. What I mean is if I type "http://localhost/script.php/1" it will crash. I want to do this so I can avoid "http://localhost/script.php?test=1" for search engines. It works fine in module mode though!! I hope this makes sense...it is hard to explain =) I am using apache 1.3.20. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13316&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]