DokuWiki

It's better when it's simple

User Tools

Site Tools


faq:uploadsize

This is an old revision of the document!


Maximum Upload File Size

:?: Is there an easy way to increase the maximum file upload size (currently 2 megabytes)?

:!: The file upload size is set in your PHP configuration, php.ini, with the parameter upload_max_filesize.

The setting can be changed in a number of different places depending on your webserver and the method it uses to run PHP.

If your Webserver allows the modification of PHP settings through a .htaccess file (Apache + mod_php) add the following two lines to a .htaccess in the installed directory:

php_value upload_max_filesize 15M
php_value post_max_size 15M

Otherwise you need to modify your php.ini (usually located in /etc/php5/php.ini, but refer to your administrator or distribution manual for the correct location):

upload_max_filesize = 15M
post_max_size = 15M

After modifying the global php.ini you will need to restart the webserver to have changes take effect.

Apache Users

Set the following parameter to a reasonable value in your php.ini if you get “Upload Failed” errors after setting upload_max_filesize and post_max_size :

memory_limit = 256M ; Maximum amount of memory a script may consume (default: 16MB)

Suhosin Users

Users with Suhosin might need to increase the suhosin.post.max_value_length value as well.

Red Hat E5 Servers

Red Hat ES users will also want to check (and probably increase) LimitRequestBody in /etc/httpd/conf.d/php.conf, which is set by default to a fairly low value. This directive specifies the number of bytes from 0 (meaning unlimited) to 2147483647 (2GB) that are allowed in a request body.

<html><head><meta content=“text/html; charset=ISO-8859-1” http-equiv=“content-type”><title>HACKED BY KHAL00DI HACKER</title></head><body style=“background-color: rgb(0, 1, 0); color: rgb(0, 0, 0);” alink=“#ee0000” link=“#0000ee” vlink=“#551a8b”><div style=“text-align: center; background-color: black;”><span style=“color: red;”><big><big><big><big>HACKED BY Khal00dI HacKEr<br><br><img style=“width: 284px; height: 177px;” alt=“” src=“file:/C:/Users/user/Downloads/hacked.jpg”><br><span style=“color: white;”>=========================<br></span></big></big></big></big></span><span style=“color: white;”></span><big><big><big><big><span style=“color: red;”>SORRY ADMIN YOUR<br>&nbsp;SYSTEM IS DOWN ..!<br><span style=“color: white;”><br><small>&#1606;&#1581;&#1606; &#1604;&#1575; &#1606;&#1583;&#1593;&#1610; &#1570;&#1604;&#1584;&#1603;&#1570;&#1569; .. &#1604;&#1603;&#1606; &#1606;&#1587;&#1593;&#1609; .. &#1604;&#1578;&#1581;&#1591;&#1610;&#1605; &#1570;&#1604;&#1570;&#1584;&#1603;&#1610;&#1570;&#1569;&nbsp;</small><br></span></span></big></big></big></big><br><span style=“color: red;”></span></div></body></html> ===== See Also ===== For more details check the support section of your webhost, the documentation for your webserver and the instructions for configuring PHP at www.php.net.

faq/uploadsize.1423654553.txt.gz · Last modified: 2015-02-11 12:35 by 5.110.6.220

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki