View previous topic :: View next topic |
Author |
Message |
HawkleyFox -
Joined: 09 Apr 2006 Posts: 5
|
Posted: Tue Apr 11, 2006 4:24 am Post subject: One more "No input file specified" Thread |
|
|
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 |
|
 |
Tom Chapman -
Joined: 09 Jul 2005 Posts: 933 Location: Australia
|
Posted: Tue Apr 11, 2006 4:56 am Post subject: |
|
|
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 |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Tue Apr 11, 2006 10:08 am Post subject: |
|
|
"." 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 |
 |
 |
HawkleyFox -
Joined: 09 Apr 2006 Posts: 5
|
Posted: Tue Apr 11, 2006 2:45 pm Post subject: |
|
|
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 |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Apr 11, 2006 2:49 pm Post subject: Re: One more "No input file specified" Thread |
|
|
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 |
|
 |
HawkleyFox -
Joined: 09 Apr 2006 Posts: 5
|
Posted: Tue Apr 11, 2006 3:57 pm Post subject: |
|
|
Really? Hmm... Its odd that I can run it via command line, though. Allright then. Thank you for the help. |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Tue Apr 11, 2006 10:57 pm Post subject: |
|
|
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 |
|
 |
|