{"id":97,"date":"2013-10-22T07:48:00","date_gmt":"2013-10-22T07:48:00","guid":{"rendered":"http:\/\/306@jodohost.com\/\/blog\/"},"modified":"2013-10-22T07:48:00","modified_gmt":"2013-10-22T07:48:00","slug":"how-to-increase-decrease-the-upload-limit-for-php-in-the-windows-2003-2008-2008-r2-server","status":"publish","type":"post","link":"http:\/\/www.jodohost.com\/blog\/index.php\/2013\/10\/22\/how-to-increase-decrease-the-upload-limit-for-php-in-the-windows-2003-2008-2008-r2-server\/","title":{"rendered":"How to increase\/decrease the upload limit for PHP in the Windows 2003\/2008\/2008 R2 server"},"content":{"rendered":"<p>We need to upload using the web interface on a PHP-based application sometimes. We have to set an upload limit by which we can allow a domain\/directory to upload the file\/image or anything from the web interface. We can do this using php.ini.<\/p>\n<p>On the Windows 2003 server, we are able to set a custom php.ini file for a particular domain\/directory but on the Windows 2008 server we are unable to do this for individual domain directories.<\/p>\n<p>Here are the steps which we need to follow to set the upload limit for PHP at the server end:-<\/p>\n<p>1.\u00a0\u00a0\u00a0 Locate your php.ini file (can find it in the root drive under the PHP folder).<br \/>2.\u00a0\u00a0\u00a0 Open the php.ini file in Notepad.<br \/>3.\u00a0\u00a0\u00a0 Search or find the following &#8220;upload_max_filesize&#8221; (the maximum allowed size for uploaded files).<br \/>4.\u00a0\u00a0\u00a0 Next to it write the value which you want to set which is by default 2 MB.<br \/>5.\u00a0\u00a0\u00a0 Close and save php.ini.<br \/>6.\u00a0\u00a0\u00a0 You may need to have an IIS reset to have the change reflected.<\/p>\n<p>Note:- In Windows 2003, you will need to copy the original php.ini and paste the domain root for which you want to set the upload limit. And in Windows 2008\/2008 R2, it works serverside.<\/p>\n<p>In the same way we can also limit the &#8221;maximum number of files that can be uploaded via a single request&#8221; for a PHP-based application. For this, please search &#8220;max_file_uploads&#8221; in php.ini instead of upload_max_filesize. By default this limit is 20.<\/p>\n<p> ]]><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We need to upload using the web interface on a PHP-based application sometimes. We have to set an upload limit by which we can allow a domain\/directory to upload the file\/image or anything from the web interface. We can do this using php.ini. On the Windows 2003 server, we are able to set a custom [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/97"}],"collection":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=97"}],"version-history":[{"count":0,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/97\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}