- Upload Suite Overview
- What's New?
- Choosing Upload Technology
- Evaluating Upload Suite
- Upload Suite Editions
- System Requirements
- Installation and Deployment Notes
- ActiveX/Java Uploader
- HTML5/Flash Uploader
- Before You Started with HTML5/Flash Uploader
- HTML5/Flash Uploader Architecture
- HTML5/Flash Uploader User Interface
- Getting Started
- Using HTML5/Flash Uploader
- Uploading in ASP.NET
- Uploading in PHP
- Uploading in Other Platforms
- Uploading Images
- Customizing User Interface
- Configuring Common Upload Settings in HTML5/Flash Uploader
- Configuring Files to be Uploaded in HTML5/Flash Uploader
- Sending File at Once or in Several Parts in HTML5/Flash Uploader
- Configuring Fail-safe Upload
- Uploading Large Amount of Images
- Configuring Restriction Rules for Files
- Using HTML5/Flash Uploader at Runtime
- Using Host and Upload Domains that Differ from One Another
- Enabling Cross-Origin Resource Sharing for HTML5 Uploader
- Uploading to Amazon S3 with HTML5 Uploader
- Troubleshooting
- Reference
- Licensing Information
- Legal Notices
Configuring HTML5/Flash Uploader PHP
Normally, default server configuration does not allow to upload files with HTML5/Flash Uploader. This topic describes how to configure a server you are going to deploy HTML5/Flash Uploader on properly.
Configuring Permissions
The folder where you are going to save files should have modify permissions. Depending on your operating system it can be set in one of the following ways:
- On Windows NT/2000/XP you should grant the modify permission to the Internet guest user (IUSR_<machinename>).
- On Windows 2003 Server you should grant the modify permission to the NETWORK SERVICE group.
- On Windows Vista/2008 Server/7 you should grant the modify permission to the account your site application pool is running under, Network Service by default.
- For *NIX systems you should specify read and write permissions.
Configuring Maximum POST Request Length
Usually, a limitation for maximum POST request length is specified to reduce the risk of DoS attacks. If the request size exceeds a specific value, it is considered malicious and the upload would be broken.
Editing PHP Configuration Files
To increase the limit of the maximum upload size, you should edit your PHP configuration files:
-
Open the
php.inifile. You can find it:- on Linux in
/etc/php.ini - on Windows in
c:\windows\php.ini
- on Linux in
-
Set the required limits:
post_max_size = 100MB upload_max_filesize = 100MB -
Additionally, you can set the following parameters:
max_file_uploads, the maximum number of files allowed to be uploaded simultaneously.memory_limit, the maximum amount of memory in bytes that a script is allowed to allocate.upload_tmp_dir, the temporary directory used for storing files when doing file upload.max_execution_time,the maximum time in seconds a script is allowed to run before it is terminated by the parser.magic_quotes_gpc, should beoff, otherwise files sent by Flash uploader may be corrupted.
To make sure that new settings are applied, use the phpinfo() function which outputs information about the current state of PHP.
<?php
phpinfo();
?>Configuring Apache Web Server
If you use the Apache web server, you should also edit the php.conf file:
-
Open the
php.conffile. You can find it:- on Linux in
/etc/httpd/conf.d/php.conf - on Windows in
<Apache installation folder>\conf\php.conf
- on Linux in
-
Change the
LimitRequestBodyparameter according to thepost_max_sizevalue, e.g.:LimitRequestBody 104857600
Do not forget to restart your server after modifying its configuration.
Configuring IIS Web Server
If you use the IIS web server, you should follow one of the next configurations.
IIS 7 Configuration
-
Go to
C:\Windows\System32\inetsrv\config\applicationHost.configand changeXML<section name="requestFiltering" overrideModeDefault="Deny" />to:
XML<section name="requestFiltering" overrideModeDefault="Allow" /> -
Add to your application's
web.configthe following sections:XML<system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength ="2147482624" /> <!-- in bytes --> </requestFiltering> </security> </system.webServer>XML<system.web> <httpRuntime maxRequestLength="2097151"/> <!-- in kilobytes --> </system.web>
IIS 6 Configuration
Add to your application's web.config the following section:
<system.web>
<httpRuntime maxRequestLength="2097151"/> <!-- in kilobytes -->
</system.web>If you have URLScan installed and still experience this problem, go through the following steps:
- Open the
UrlScan.inifile which is typically located atC:\Windows\system32\inetsrv\urlscanfolder. - Set the MaxAllowedContentLength key to the desired value (in bytes).
- Save changes and restart IIS.
Do not forget to restart your server after modifying its configuration.