Wednesday, July 14, 2010

Upload A Large File In Php With Iis 6







Large file uploads need to be enabled in PHP.








IIS (Internet Information Services) is a web server developed by Microsoft for the Windows operating system. IIS 6.0 is a critical component of Windows 2003 Server and can be extended with the use of PHP (Pre-Hypertext Processor) to allow the use of web programming and Internet applications. PHP comes with restrictive settings that help to ensure system security and in doing so, limits the size of file uploads. These settings can easily be modified in order to allow your software to upload a large file.


Instructions


1. Open your php.ini file on the system where IIS and PHP are installed. This will be located in your PHP directory or your Windows folder. By default these paths are either C:\Program Files\PHP5 or C:\Windows.


2. Open the php.ini file in notepad and edit the line beginning with "upload_max_filesize" from a value of "2M" to the upload size you would like to use. 2M represents 2 megabytes, and you should set this to a value large enough for the file upload you would like to allow.


3. Save the file in notepad by choosing "Save" from the file menu.


4. Open a command prompt by opening the "Start" menu, selecting "Run" and entering the unquoted command "cmd".


5. Restart IIS by typing the command "iisreset" without quotes.

Tags: file notepad, file uploads, would like