View Full Version : Mysterious 404

18-01-2005, 07:01 PM
OK, here is my problem.

Well, actually it is not my problem but one of a hosting customer.

After installing Windows Server 2003 (from 2000) a mysterious problem appeared with a customer's site.

The site in question is www.katatoonz.com.

Now, it works perfectly except for one thing:

http://www.katatoonz.com/forums gives a 404 error. But it certainly exists. Directly referring to any file in there yields the same result, ie www.katatoonz.com/forums/index.php.

IIS 6 recognises the folder as existing, and permissions are set correctly.

Other subdirectories of the site, such as /katatoonz and /toplist work perfectly. No other websites have any such problems.

If I try to rename the forums directory from within Windows I get an Access Denied error, but I think that's because there is a DSN mapped to a database within it. I will experiment and add on to this post.

Cheers George

18-01-2005, 07:06 PM
Even after removing the ODBC connection the 'forums' folder can still not be renamed .... the plot thickens :o

18-01-2005, 07:13 PM
nope, can't get /forums/index.php

18-01-2005, 07:25 PM
Nope, I can't get it either
There might be other issues as well
How fast is the server?
I tried to view some of the competition flash movies they had made & on full speed j/stream I left, as they were taking an age to load.
Very hard on the eyes
Sorry, wandering off the topic now

18-01-2005, 07:50 PM
what if you shift the forums to another directory?

18-01-2005, 07:55 PM
But this is a customer is it not? This is what you say.

If you are professional and know what you are doing then why ask here?

18-01-2005, 08:04 PM
im geting a 404 on a file i uploded last night
so its my site(not that ive bothered to uplode much of a site) 2
its at

18-01-2005, 08:06 PM
http://www.katatoonz.com/forums gives a 404 error. But it certainly exists. Directly referring to any file in there yields the same result, ie www.katatoonz.com/forums/index.php (http://www.katatoonz.com/forums/index.php).

IIS 6 recognises the folder as existing, and permissions are set correctly.

Sorry if this is stating the obvious, but is PHP correctly installed on the server? I'm pretty sure IIS doesn't support PHP OOTB, so it'd have to be installed seperately and tied in with IIS. All the other links I looked at on that site were either ASP or HTML, which are natively supported by IIS, however the forum uses PHP.



18-01-2005, 08:28 PM
Yeah, php works fine - it's just that particular directory.

Sam, I was still getting the server running at that time, it is all fine now. KT is the only site with any problem now.

Elephant, I don't exactly know if anyone could call me a "professional", but I can say this - I have never encountered this problem before, but most things I would certainly know... but not this obviously. That's why I have come here. And of course, I'm new to Server 2003 and IIS 6.

I think it has something to do with the access denied thing. I am currently logged on as Administrator and have full access to the entire PC ..... but get Access Denied when I try to rename the folder.

OK better luck now - if I stop the site in IIS it becomes renamable. But still gives 404 after renaming to /forums2.

18-01-2005, 08:56 PM
<stab in the dark>
It's a script - execute permissions on the files/folders?
</stab in the dark>

Edit: Logs - is there anything showing there?

Edit2: This sounds like your problem:

Edit3: This sounds more like it:

Edit4: Ok, now with screenshots:

Where is your Google-Fu™ - one search and all those on the first page.

If those don't do it, get Googling:

18-01-2005, 10:12 PM
Cheers ninja, I think you've got it.

Now I get a new error message:

Security Alert! The PHP CGI cannot be accessed directly.

This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.

For more information as to why this behaviour exists, see the manual page for CGI security.

For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.

18-01-2005, 11:10 PM
says this:

"Read your php.ini file, the "Paths and Directories" section. It tells you that if you're using IIS you must set
cgi.force_redirect = 0 "

See if that does it...

Google first, ask questions later?

Google (http://www.google.co.nz/search?q=Security+Alert!+The+PHP+CGI+cannot+be+acc essed+directly.&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official)

Perhaps: During the install the windows PHP installer puts the php.ini file in the "C:\Documents and Settings\Administrator\WINDOWS" folder. It must be moved to (%SYSTEMROOT%\php.ini). Once I did that everything works fine.

19-01-2005, 12:13 AM

Thanks very much again ninja :)

Graham L
19-01-2005, 04:02 PM
What is the problem. That's exactly how HTTP is supposed to work. :D

There is no file "... katoons.com/forum". It's the name of a directory. URLs refer to files. The many people who try to access sites by typing in "http://this.is.not.a proper.url.com" should receive a 404 too. ;) You should either give the "/" at the end, or an actual filename of the object required.

You might find that "...katoons.com/forums/" (note the "/") will work. That now is trying to access the contents of the directory. If there's no default index file, most http servers will format up a directory listing in HTML and send that. There's usually a well defined default index file in the home directory of a site.

I think that most servers or browsers will try to help out by adding a slash if it's missing.

But a strict reading of the protocol says it's an error.

You can certainly fix the configuration file for that customer. It obviously hasn't got "index.anything" being served up when the caller makes an error.

Looking back I see I am talking about "forced redirection", and while I have been writing this you've been getting the answer. :D

19-01-2005, 05:27 PM
It wasn't working because the files weren't configured to be procesed properly by the webserver.

The other problem is that IIS servers in their infinite greatness spit back a 404 error for everything, rather than just page not found.