Saturday, 2 August 2014

File upload not working on PHP Server

Few days back, our team faced a new issue in file upload on server. It was restricting user to upload file size over 8KB while the following parameters were already set :

php_value file_uploads  On
php_value upload_max_filesize 200M
php_value memory_limit  512M
php_value post_max_size 200M
php_value max_execution_time 1000
php_value max_input_time 300

but still file uploading was not working.

Searched over internet and found that above problem was due to LimitRequestBody Directive of Apache. This parameter Restricts the total size of the HTTP request body sent from the client.

"The LimitRequestBody directive allows the user to set a limit on the allowed size of an HTTP request message body within the context in which the directive is given (server, per-directory, per-file or per-location). If the client request exceeds that limit, the server will return an error response instead of servicing the request. The size of a normal request message body will vary greatly depending on the nature of the resource and the methods allowed on that resource."

If, for example, you are permitting file upload to a particular location, and wish to limit the size of the uploaded file to 100K, you might use the following directive:

LimitRequestBody 102400

Please chekc the following link for full description :

http://httpd.apache.org/docs/2.0/mod/core.html#limitrequestbody


Thanks!!!!!!!! Enjoy Programming :)

No comments:

Post a Comment

Thanks for your valuable comments.

Odoo 10: Close wizard and open standard form

Hi, Today we are going to learn how to open standard form after saving data in wizard. Let's say I have created an wizard to fill bas...