PDA

View Full Version : Mysterious 404



george12
18-01-2005, 06: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

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

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

bartsdadhomer
18-01-2005, 06: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

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

Elephant
18-01-2005, 06: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?

sambaird
18-01-2005, 07: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
http://sam.jgi.co.nz/jokes.doc

Mike
18-01-2005, 07: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.

HTH

Mike.

george12
18-01-2005, 07: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.

ninja
18-01-2005, 07: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:
http://www.codecomments.com/PHP_on_Windows/message315593.html

Edit3: This sounds more like it:
http://www.hintsandtips.com/ShowPost/302/hat.aspx

Edit4: Ok, now with screenshots:
http://www.visualwin.com/PHP/

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

If those don't do it, get Googling:
http://www.google.co.nz/search?q=IIS+6+php+404&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official

george12
18-01-2005, 09: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.

ninja
18-01-2005, 10: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...
RW

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.

george12
18-01-2005, 11:13 PM
Fixed.

Thanks very much again ninja :)

Graham L
19-01-2005, 03: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

ninja
19-01-2005, 04:27 PM
schtuff
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.