#49039 [Com]: Can't pass file name with subfolder name 3 characters or less
| From: | sant9442 at gmail dot com | Date: | Thu, 23 Jul 2009 21:07:36 +0000 |
| Subject: | #49039 [Com]: Can't pass file name with subfolder name 3 characters or less | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-140164@lists.php.net to get a copy of this message | ||
ID: 49039
Comment by: sant9442 at gmail dot com
Reported By: sant9442 at gmail dot com
Status: Feedback
Bug Type: CGI related
Operating System: Windows
PHP Version: 5.3.0
New Comment:
From: pajoye@php.net
> It does not make sense to me.
> Are these paths real paths or mounted (virtual or not),
> junctions, etc
Good question. All of the above was tried.
All this started with a programmer reported that our PHP extension
PHP_WILDCAT.DLL called PWE (PHP Wildcat Extenson) for 5.2.6 was not
working with 5.3.0.
Our installed creates to sub folders for PWE sample scripts:
Server side (using d:\wc63 install folder of our hosting server)
d:\wc63\http\pwe
d:\wc63\http\public\pwe
In our system, http is inherently private (authentication is required)
with the excepton of the public\ folder. So d:\wc6\http is the
docuument root, and URL references will be:
/pwe
/public/pwe
In any case, after downloading 5.3-WIN32 and the source code for VC6
builds, I recompiled the PHP_WILDCAT.DLL extension for 5.3. and the
first test was:
/pwe/phpinfo.php
to see the Wildcat! extension module info. But I got the "No Input
File Specified." error. I copied it to the public\pwe folder and tried
it:
/public/pwe/phpinfo.php
and that worked.
That began a 10 hour adventure to see what was going on. I focused on
the the ini CGI settings which were:
;doc_root =
cgi.force_redirect=0
;cgi.fix_pathinfo=1
and I wasted time trying all kinds of variations to no avail. What I
did finally realized that it wasn't related to our extension and could
repeat the problem via the command line, by simply emulating what the
web server would do:
cd \wc63\http
d:\wc63\php\php-cgi.exe d:\wc63\http\pwe\phpinfo.php
d:\wc63\php would be where PHP installed, but it can be anywhere of
course. The result of above is:
Status: 404 Not Found
X-Powered-By: PHP/5.3.0
Content-type: text/html
No input file specified.
Now, I have PHP 5.2.6, also installed
d:\wc63\php526\php-cgi.exe d:\wc63\http\pwe\phpinfo.php
X-Powered-By: PHP/5.2.6
Content-type: text/html
HELLO PRIVATE
Now, all I have to do is use a folder that is not 3 characters, which I
have one called WCPHP which I created and copied the script to:
d:\wc63\php\php-cgi.exe d:\wc63\http\wcphp\phpinfo.php
Status: 404 Not Found
Content-type: text/html
HELLO PRIVATE
Anyway, once I saw it was the 3 character PWE folder I was thinking of
how to fool it or change our installer to use longer folder names. I
even tried a junction
cd \wc63\http
junction wcphp pwe
and it that didn't work which left me wondering if PHP-CGI.EXE was
resolving the junction path.
This is all odd and rest assured, whether anyone can repeat it or not,
the issue does exist. I hope some one can trace thru the logic.
Previous Comments:
------------------------------------------------------------------------
[2009-07-23 20:36:07] pajoye@php.net
It does not make sense to me.
Are these paths real paths or mounted (virtual or not), junctions,
etc?
------------------------------------------------------------------------
[2009-07-23 20:11:32] sant9442 at gmail dot com
I am getting mixed results:
All these are called from my d:\wc63\http document root folder (not set
in the ini, by switched there by the web server which also sets
DOCUMENT_ROOT=d:\wc63\http :
D:\wc63\http>G:\files\php\php5.3-200907231830\php-cgi
v:\wc5beta\http\wcphp\phpinfo.php
PHP Warning: Unknown: failed to open stream: No such file or directory
in Unknown on line 0
Status: 404 Not Found
X-Powered-By: PHP/5.3.1-dev
Content-type: text/html
No input file specified.
D:\wc63\http>G:\files\php\php5.3-200907231830\php-cgi
v:\wc5beta\http\wcphp\phpinfo.php
PHP Warning: Unknown: failed to open stream: No such file or directory
in Unknown on line 0
Status: 404 Not Found
X-Powered-By: PHP/5.3.1-dev
Content-type: text/html
No input file specified.
D:\wc63\http>G:\files\php\php5.3-200907231830\php-cgi
v:\wc5beta\http\pwe\phpinfo.php
PHP Warning: Unknown: failed to open stream: No such file or directory
in Unknown on line 0
Status: 404 Not Found
X-Powered-By: PHP/5.3.1-dev
Content-type: text/html
No input file specified.
D:\wc63\http>G:\files\php\php5.3-200907231830\php-cgi
d:\wc63\http\public\pwe\phpinfo.php
X-Powered-By: PHP/5.3.1-dev
Content-type: text/html
hello
D:\wc63\http>G:\php526\php-cgi.exe d:\wc63\http\public\pwe\phpinfo.php
X-Powered-By: PHP/5.2.6
Content-type: text/html
hello
D:\wc63\http>G:\php526\php-cgi.exe
d:\wc63\http\public\wcphp\phpinfo.php
Status: 404 Not Found
X-Powered-By: PHP/5.2.6
Content-type: text/html
No input file specified.
D:\wc63\http>G:\php526\php-cgi.exe d:\wc63\http\pwe\phpinfo.php
X-Powered-By: PHP/5.2.6
Content-type: text/html
HELLO PRIVATE
I don't wish to spend another ten hours on this trying to explain it.
As shown in the last example, none of these php-cgi.exe command line
issues appear in 5.2.6 or lesser version. Only with 5.3.
Here is my analysis of the situation. In 5.3, there was a massive
change to the parsing and file name resolution logic. There are issues
with it.
Unfortunately, I lack the time to get into a windows recompiling
project I can trace it down. The last time I did that I lost a tooth.
:-)
Please also see bug #49040 which was found during the time trying to
figure this out expecting it was related to the cgi ini settings and/or
the env settings where were not the case.
thanks
------------------------------------------------------------------------
[2009-07-23 19:25:10] pajoye@php.net
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
If any, try a 5.3 snapshot...
------------------------------------------------------------------------
[2009-07-23 19:22:43] jani@php.net
Please try using this snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2009-07-23 19:09:07] sant9442 at gmail dot com
It should be noted that we spend 10 hours on this issue, first
believing it was related to changed to the php.ini options
;doc_root =
;cgi.fix_pathinfo = 1
cgi.force_redirect = 0
and CGI environment strings:
DOCUMENT_ROOT=d:\wc63\http
PATH_INFO=/pwe/helloworld.php
SCRIPT_NAME=/pwe/helloword.php
PATH_TRANSLATED=d:\wc63\http\pwe\helloworld.php
SCRIPT_FILENAME=d:\wc63\http\pwe\helloworld.php
which all research (googling) of "no input file specified" related to.
Reqardless of what we tried, it would not work until I discovered the 3
character folder name off the root folder was the problem. Renaming it
to 4 characters or more, solved the issue and that was discovered when
all other URLS were working and we noticed the only difference was the 3
character length of the folder name.
This comment is mentioned so that time isn't wasted on the above issues
related and possible reasons for "no input file specified."
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/49039
--
Edit this bug report at http://bugs.php.net/?id=49039&edit=1