Bug #54955 [Com]: FastCGI doesn't recognize Windows relative paths

From: Date: Wed, 10 Aug 2022 08:53:28 +0000
Subject: Bug #54955 [Com]: FastCGI doesn't recognize Windows relative paths
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242172@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=54955&edit=1

 ID:                 54955
 Comment by:         lvslinux at gmail dot com
 Reported by:        johanntrg at msn dot com
 Summary:            FastCGI doesn't recognize Windows relative paths
 Status:             No Feedback
 Type:               Bug
 Package:            CGI/CLI related
 Operating System:   Windows 7 64bits SP1
 PHP Version:        5.3.6
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

The same bug still exists. PHP Version 8.1.8 and ngix webserver. 
If the root in the NGIX server is i.e. "root ../myserver/ ;" the resolved SCRIPT_FILE name
will contain "..". This causes a " No input file specified" error even thou the
file exists and the path is valid.


Previous Comments:
------------------------------------------------------------------------
[2021-09-05 04:22:08] 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.

------------------------------------------------------------------------
[2021-08-27 14:44:29] 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.

------------------------------------------------------------------------
[2012-12-04 09:14:08] 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

------------------------------------------------------------------------
[2011-05-30 22:08:30] 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.



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=54955&edit=1


Thread (7 messages)

« previous php.bugs (#242172) next »