One more "No input file specified" Thread

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
HawkleyFox
-


Joined: 09 Apr 2006
Posts: 5

PostPosted: Tue Apr 11, 2006 4:24 am    Post subject: One more "No input file specified" Thread Reply with quote

Well, this is a little odd. Any script whose name has two or more periods side by side in the file name will result in the "No input file specified" error being thrown by PHP.

/php..file.php

Now, I know there is the obvious "Just rename the file" fix, however, for simplicity's sake, I didn't include all the details of why this fix won't work, and the fix I am searching for should be able to accomidate two periods side-by-side.

Setting doc_root in PHP.ini to the root of my web server only fixes it for scripts in the very root of the server. It doesn't fix any that are in subdirectories or aliased folders.

Does this occur on any Abyss server (or any server of any type), or is it unique to me? If I run the script via command line, it runs fine, so PHP can accept a file with two periods side-by-side. Its just a little odd... Seems like it should work fine.
Back to top View user's profile Send private message
Tom Chapman
-


Joined: 09 Jul 2005
Posts: 933
Location: Australia

PostPosted: Tue Apr 11, 2006 4:56 am    Post subject: Reply with quote

Perhaps Abyss or PHP simply does not support two periods side by side. I'm no expert when asked a question related to the environments in which things run but why would you need two periods side by side any how?
Back to top View user's profile Send private message Visit poster's website MSN Messenger
MonkeyNation
-


Joined: 05 Feb 2005
Posts: 921
Location: Cardiff

PostPosted: Tue Apr 11, 2006 10:08 am    Post subject: Reply with quote

"." is the value of the current directory, so .. is the parent directory. PHP takes the path as a whole, so it assumes you mean /php, then /, then file.php, which of course doesn't exist.
I don't really think there is anything you can do about it either.
_________________
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number
HawkleyFox
-


Joined: 09 Apr 2006
Posts: 5

PostPosted: Tue Apr 11, 2006 2:45 pm    Post subject: Reply with quote

Ahhh... That makes sense. However, anybody could tell that this is a parsing error in the server. The only valid way to parse ".." as a path is if it follows a slash. This is the way it was in DOS, and the way I assumed it would allways be.

Could be a linux thing, I dunno.

Now, the funny thing is that if the file "php..file.php" doesn't exist in the directory, it throws a normal server generated 404. The server is able to tell if the file exists, but it then resolves the path wrong, then passes that path to PHP which sees no file in the completely fictional location.

Well, either way, this has "bug" written all over it, but I can see why a bug like this never popped up.
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Apr 11, 2006 2:49 pm    Post subject: Re: One more "No input file specified" Thread Reply with quote

HawkleyFox,

It's PHP which fails to locate the file in this case: you can still access this file with Abyss Web Server only if it is static and not associated with PHP.

Note that it is not PHP fault's (totally). Windows API are very weird when it comes to naming and locating files: In Abyss Web Server we had to write our own functions to validate file paths and to allow access to files with names like that because Windows API functions were not working correctly with them.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
HawkleyFox
-


Joined: 09 Apr 2006
Posts: 5

PostPosted: Tue Apr 11, 2006 3:57 pm    Post subject: Reply with quote

Really? Hmm... Its odd that I can run it via command line, though. Allright then. Thank you for the help.
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Tue Apr 11, 2006 10:57 pm    Post subject: Reply with quote

It's a good idea to just name your files with underscores instead of dots.
Here's an example: php..file.php to php_file.php
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group