Windows server: 404 - File or directory not found

Windows server: 404 - File or directory not found

by ivan breziansky -
Number of replies: 6

Hi,

Im having problems uploading files larger then 20MB. Php is set..:

max_execution_time = 900 ; Maximum execution time of each script, in seconds
max_input_time = 600 ; Maximum amount of time each script may spend parsing
post_max_size = 150M ; Maximum size of POST data that PHP will accept. upload_max_filesize = 150M

ActivityTimeout and RequestTimeout in FastCGI config file (fcgiext.ini) is set to 900

Error path..: http://www.address/files/index.php

When i send 15MB file, it goes fine, but larger then 30+, im getting error- attached. Its a new installation of Moodle on Win 2008, IIS7.


Please help me out here.

IB


Attachment 11.jpg
Average of ratings: -
In reply to ivan breziansky

Re: Windows server: 404 - File or directory not found

by ivan breziansky -
I have IIS7. How do i check this setting..?
Make sure the web
server has read access into this folder.

In reply to ivan breziansky

Re: Windows server: 404 - File or directory not found

by John Struchynski -

We run Moodle on IIS7 (Web Server 2008) and been having very good luck with it.

We have noticed that Moodle error messages(refer to my image example below), that are reported by Moodle's print_error() function, display IIS7's standard 404 template page just like the example in your post.

We are also aware that you can get Moodle's generated error page to display when browsing via localhost(on the server) ...

and also when ...

you have the IIS7 404 "Detailed Error" setting turned on. What we don't like about this is that other non-Moodle generated site errors will cause IIS7 to show too much detailed information about the website when the user stumbles upon them.

What I suggest, is that you try uploading your file from the console(the server) or turn ON the the IIS7 404 "Detailed Error" setting. Then you should see the error message that Moodle is generating(reporting via print_error) in your case. This Moodle error message may then help identify what the problem is.

That said, if anyone knows how we can get Moodle's print_error() message served to users WITHOUT turning on the IIS7 404 "Detailed Error" setting, please share what you know.

Attachment csvErrorMsg.jpg
In reply to John Struchynski

Re: Windows server: 404 - File or directory not found

by Bob Smith -

Hi,

Last year, I battled with this one myself for a good 6 months.  The moodle forums would ocassionaly come up with a user with a similar problem however the issue never really got resolved.

Then, finally, one day (or should I say day & night) I got annoyed and sat down with the intention of not getting up until I fixed it.

Your problem description is absolutly spot on.  After much digging, i came across a flag for <httpErrors> which resolves the issue without enabling detailed error messages for all users.

Basically when there is an existingResponse from the FastCGI pipleline (it generates the 404 response code when an error occurs within the php code), the default setting for ISS 7 is "Auto" which passes the details through to the custom error page handling modules.  There is an option to configure this to PassTrough to the calling page which can then handle the error internally.

Unfortunately, after I found this information hidden within the Microsoft documentation for IIS, a quick google using the PassThrough and existingResponse keywords returned the following site.  Even more unfortunate (for us) is that you will notice the screenshots are of Moodle however no-where on the page is the word "Moodle" mentioned, therefore all my previous searches never had a chance finding this blog.

I've been out of the Moodle game for a few months because I changed jobs (just popped in to see how it's all going today by luck) therefore I wont go into detail on how to apply the setting to your site, I'll simply point you towards the blog which I referred to above: 

http://blogs.iis.net/kehand/archive/2009/08/09/php-and-custom-error-pages.aspx

Let me know how it all pans out for you,

Bob

Average of ratings: Useful (3)
In reply to Bob Smith

Re: Windows server: 404 - File or directory not found

by John Struchynski -

Bob

Thanks so much for pointing me to the answer!!
I was unaware of the "PassThrough" feature and how it could be configured within IIS7.

That solved my issue.
Thanks again!

In reply to John Struchynski

Re: Windows server: 404 - File or directory not found

by Jago Brown -

Thank you Bob &  website

Copied from website: 1 of the 3 contexts in IIS where existingResponse="PassThrough"  can be applied:

 

You can also do this by editing (and creating if needed) a web.config file in the actual folder of the location, which would look something like this:

 

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors existingResponse="PassThrough" />
    </system.webServer>
</configuration>
Average of ratings: Useful (1)