php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16998 CGI version: Problematical Slash in URL
Submitted: 2002-05-03 22:53 UTC Modified: 2002-05-04 12:22 UTC
From: bob at Prose-n-Poetry dot com Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 4.1.2 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bob at Prose-n-Poetry dot com
New email:
PHP Version: OS:

 

 [2002-05-03 22:53 UTC] bob at Prose-n-Poetry dot com
In my webhost (Linux) a URL such as:  http://mysite.com/show_article/22 can be used. The file show_article is forced to be interpreted as php through .htaccess.  22, of course, refers to the article number. I just installed Apache, PHP and mySql on my computer, setting it up as a server, using localhost as the url. None of these URLs work and produce "error 500, Premature end of script headers: C:/PHP/php.exe."  Tracing it carefully I found that the slash just before '22' is the problem.  The URL http://localhost/display_article/ also gives the same error.

Any help would be appreciated,

bob

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-03 23:02 UTC] bob at Prose-n-Poetry dot com
A quick footnote:
That structure in the URLs is very search-engine friendly. My site has over 5000 pages and is highly placed, hence I can't easily change.
 [2002-05-04 01:17 UTC] mfischer@php.net
The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php
 [2002-05-04 12:13 UTC] bob at Prose-n-Poetry dot com
This was NOT a support request.  I have found that at other sites.

I have a problem with not considering this a bug. When PHP interprets URL's in one fashion complied as an Apache module under Linux yet translates these same URL's differently in the Windows CGI version then it seems obvious that either the Linux-Apache version has a bug or the Windows version does.  In either case, it does not make for good cross-platform portability.

I am aware there are workarounds which involve major rewriting of user code to accomplish this portability. The 'help' I was asking for was as one of a community of users, that it might be addressed in the next release so we are not all forced to rewrite out code to account for cross-platform incompatabilities.
 [2002-05-04 12:22 UTC] rasmus@php.net
It's not a bug in PHP.  And yes, it is a bit of a support request because you are asking us to explain why you can't do CGI redirection and PATH_INFO urls at the same time.  That is a limitation of the web server and has nothing to do with PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 11:01:29 2024 UTC