PHP Increase Upload File Size Limit

www.‮ttual‬uri.com
PHP Increase Upload File Size Limit

To increase the upload file size limit in PHP, you can modify the upload_max_filesize and post_max_size directives in the php.ini configuration file. Here are the steps you can follow to increase the upload file size limit in PHP:

  1. Find the location of the php.ini file:

  2. The php.ini file is the main configuration file for PHP. To find its location, you can use the phpinfo function to display the path to the file:

<?php
phpinfo();
?>
  1. Save the file as phpinfo.php and place it in your web server's document root. Then, access the file in a web browser to view the PHP information page.

  2. Look for the "Loaded Configuration File" setting in the PHP information page. The path to the php.ini file will be listed under this setting.

  3. Modify the upload_max_filesize and post_max_size directives:

  4. Open the php.ini file in a text editor and locate the upload_max_filesize and post_max_size directives.

  5. Increase the values of these directives to the desired file size limit. For example, to increase the file size limit to 100 MB, you can set the directives as follows:

upload_max_filesize = 100M
post_max_size = 100M
  1. Save the changes to the php.ini file.

  2. Restart the web server:

  3. After modifying the php.ini file, you will need to restart the web server for the changes to take effect.

Created Time:2017-10-30 14:27:08  Author:lautturi