Organizational Research By

Surprising Reserch Topic

Question:how to Control POST Size in php



asked Sep 13, 2013 in PHP by rajesh
edited Sep 12, 2013
0 votes
18 views



Related Hot Questions

2 Answers

0 votes
The HTTP POST request method is used when the client (browser or user) needs to send data to the Apache web server as part of the request, such as when uploading a file or submitting a completed form. Attackers may attempt to send oversized POST requests to eat your system resources. You can limit the maximum size POST request that PHP will process. Edit /etc/php.d/security.ini and set the following directive:

; Set a realistic value here
post_max_size=1K

The 1K sets max size of post data allowed by php apps. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. I also suggest that you limit available methods using Apache web server. Edit, httpd.conf and set the following directive for DocumentRoot /var/www/html:

 

    
        Order allow,deny
    

## Add rest of the config goes here... ##
answered Sep 13, 2013 by rajesh
edited Sep 12, 2013
0 votes
The HTTP POST request method is used when the client (browser or user) needs to send data to the Apache web server as part of the request, such as when uploading a file or submitting a completed form. Attackers may attempt to send oversized POST requests to eat your system resources. You can limit the maximum size POST request that PHP will process. Edit /etc/php.d/security.ini and set the following directive:

; Set a realistic value here
post_max_size=1K

The 1K sets max size of post data allowed by php apps. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. I also suggest that you limit available methods using Apache web server. Edit, httpd.conf and set the following directive for DocumentRoot /var/www/html:

 

    
        Order allow,deny
    

## Add rest of the config goes here... ##
answered Sep 13, 2013 by rajesh
edited Sep 12, 2013

...