Home > Moodle, PHP, xampp > How to change upload file size on a Windows localhost

How to change upload file size on a Windows localhost

In a localhost Apache + PHP it is easy to change the uploaded file size to something larger than the default 16M.

An example below show you how to change the upload file size to say 50M.

  • Locate the PHP.ini file, for example in c:/xampp/Apache/bin/php.ini and open it with any text editor like WordPad by right-clicking -> Open With -> then choose WordPad.

  • In this file scroll or do a search on the text “_max_” to find

upload_max_filesize = 16M

  • modify that line to
upload_max_filesize = 100M
  • In the same way, find

post_max_size = 16M

  • modify that line to
post_max_size = 100M
  • Save the file.

After any changes to the php.ini file you need to restart Apache. So restart XAMPP and browse to localhost. You should find that the Upload file size in Configuration now reads 50M.

To check the effect, run the phpinfo facility provided by XAMPP or you can create your own simple PHP script file which consists only this code:

<?php

phpinfo();

?>

Save the file on the document root folder, for example c:\xampp\htdocs\phpinfo.php, then open it from your browser at http://localhost/phpinfo.php.

Reblog this post [with Zemanta]

  • Share/Bookmark
  1. No comments yet.
  1. No trackbacks yet.
This site uses a Hackadelic PlugIn, Hackadelic SEO Table Of Contents 1.6.0.