php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54955 FastCGI doesn't recognize Windows relative paths
Submitted: 2011-05-30 22:08 UTC Modified: 2021-09-05 04:22 UTC
Votes:5
Avg. Score:4.4 ± 0.8
Reproduced:5 of 5 (100.0%)
Same Version:1 (20.0%)
Same OS:4 (80.0%)
From: johanntrg at msn dot com Assigned: cmb (profile)
Status: No Feedback Package: CGI/CLI related
PHP Version: 5.3.6 OS: Windows 7 64bits SP1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
39 - 31 = ?
Subscribe to this entry?

 
 [2011-05-30 22:08 UTC] johanntrg at msn dot com
Description:
------------
I have configured my webserver (nginx) to have its document root out of its 
working path in "..\files" (please, note the two dots). When I request static 
files, it serves them without any problem. Anyway If I request a PHP file, the 
request it's not served because php-cgi.exe running as the fastCGI server al 
127.0.0.1:9000 returns an error 400 code.

If I user absolute paths it works. Also, if I move the "..\files" folder to 
"./files" (please, note the only one dot) and I change the document root to 
reflect that new relative path.

So It looks that relative paths with two dots are not getting resolved by php-
cgi.exe as fastCGI server.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-04 09:14 UTC] marc dot fauser+php at gmail dot com
I have the same problem since months. I would even pay money to get this bug fixed. So far you can "solve" it by using mklink.

e.g.
mklink /J files ..\files
 [2021-08-27 14:44 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-08-27 14:44 UTC] cmb@php.net
To clarify: in nginx.conf you have

    root: ../files

and in php.ini you have set doc_root to the absolute path of that
root?  This works for me; either the issue has been fixed in the
meantime, or I'm missing something.  Please clarify.
 [2021-09-05 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 27 22:03:36 2021 UTC