Upload problem again
Cristian Gilè
14 September 2008, 00:20
I'm using hiawatha 6.8. The php app is menalto gallery2. I need to upload large size photos. When i try to upload a big file "500 server error page" appears. I've already set the directive for upload file size in php.ini and i've already set the directive MaxRequestSize in httpd.conf.
I've checked error log file and "CGI timeout" is the problem.
How can i fix this?
Cheers
Cristian
Hugo Leisink
15 September 2008, 15:33
It looks like the PHP scripts which handles the uploade image is taking to much time to finish its job. You need to adjust TimeForCGI. See the manpage for more information about it.
Cristian Gilè
18 September 2008, 12:30
Thanks, it works.
So, if i upload several files, TimeForCGI is the maximum time in seconds for the CGI process to finish EACH file uploaded or to finish the whole upload process?
Cheers
Cristian
Hugo Leisink
18 September 2008, 12:45
For every request of a CGI file (which PHP is), there are 2 time-settings:
TimeForRequest: the maximum time for a client to send the request. If you're expecting large POST requests, you have to increase this setting.
TimeForCGI: the maximum time for a CGI process to finish the job. If you have a CGI process which does a lot of things, (processing large uploadede files), you have to increase this setting.
Don't set them to high. Otherwise an attacker might be able to DoS your webserver.
This topic has been closed.