php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41817 CGI Trailing slash is still not correct!
Submitted: 2007-06-27 04:55 UTC Modified: 2007-07-10 01:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: progcom at gmail dot com Assigned: dmitry (profile)
Status: No Feedback Package: CGI/CLI related
PHP Version: 5CVS-2007-06-27 (CVS) OS: FreeBSD
Private report: No CVE-ID: None
 [2007-06-27 04:55 UTC] progcom at gmail dot com
Description:
------------
This is same bug as #40419, so I tried CVS version, but problem is still occured.

Request with trailing slash, PHP doen't set any PATH_INFO or PATH_TRANSLATED.


Reproduce code:
---------------
http://www.foo.com/bar.php/


Expected result:
----------------
$_SERVER['PATH_INFO'] = "/"
$_SERVER['PATH_TRANSLATED'] = "/blahblah/bar.php/"

Actual result:
--------------
$_SERVER['PATH_INFO'] = NULL
$_SERVER['PATH_TRANSLATED'] = NULL

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-28 10:09 UTC] dmitry@php.net
I was never able to reproduce this trailing slash problem.

Do you user apache with mod_fastcgi or something else?
Could you provide your FasrtCGI configuration?
 [2007-06-28 10:30 UTC] progcom at gmail dot com
Yes, I use apache 2.2.4 with mod_fastcgi 2.4.2, setup by FreeBSD ports. Here is my httpd.conf:

FastCgiServer /usr/local/www/php-bin/php-cgi
Alias /php-bin /usr/lcal/www/php-bin
Action php-fastcgi /php-bin/php-cgi
AddHandler php-fastcgi .php
AddType application/x-httpd-php .php

<Location /php-bin>
  SetHandler php-fastcgi
</Location>
 [2007-06-28 20:10 UTC] sniper@php.net
And you're absolutely sure your scripts point to the right binary?
(it was renamed to be php-cgi in 5.2.3)
 [2007-06-29 03:31 UTC] progcom at gmail dot com
Yes, runs php-cgi, not php(cli version).
 [2007-07-02 09:15 UTC] dmitry@php.net
I still not able to reproduce buggy behavior nor with Apache 1.3 neither with Apavhe 2.2. vtw I do my tests on Linux.

You have a typo in your config "lcal" instead of "local". I  would also recomend simpler configuration.

FastCgiServer /usr/local/www/php-bin/php-cgi
Alias /php-bin /usr/local/www/php-bin
Action application/x-httpd-php /php-bin/php-cgi
AddType application/x-httpd-php .php

After all it seems for me like FreeBSD realpath() bug.
Please try the following patch http://phpfi.com/246574


 [2007-07-10 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC