Problem
If you use any PHP programs as your web server you may run into this problem: “This file is too big. The maximum upload size for your server is 2M” as shown in the picture below. 2M is the default size in most PHP installations. You can change the default size settings of your server.
To change the default upload file size, you should do the following:
- Access your PHPinfo.php file to see your current upload file size. As shown in the picture below, the upload_max_filesize is 2M.
- Note down your php.ini file location. This server puts php.ini in /etc/php5/apache2/php.ini
- Access your server with any remote access tools
- Find following lines in your php.ini.
- Change the settings to fit your need. Picture below sets the maximum upload file size to 100M.
- Restart Apache server for Apache server to use new setting.
- You can check your phpinfo.php file to see the new upload file limit. Notes
If you can not change php.ini for your whole server, you can add following two lines to your .htaccess file for your web directory. However, if your web server does not listen to .htaccsss at all, you addition will not work.