- Upload Suite Overview
- What's New?
- Choosing Upload Technology
- Evaluating Upload Suite
- Upload Suite Editions
- System Requirements
- Installation and Deployment Notes
- ActiveX/Java Uploader
- Where ActiveX/Java Uploader Can Be Useful
- Before You Started with ActiveX/Java Uploader
- ActiveX/Java Uploader Fundamentals
- ActiveX/Java Uploader User Interface
- Getting Started
- Using ActiveX/Java Uploader
- Uploading in ASP.NET
- Uploading in PHP
- Configuring ActiveX/Java Uploader PHP
- Saving Uploaded Files in ActiveX/Java Uploader PHP
- Uploading Folders via ActiveX/Java Uploader in PHP
- Uploading Additional Data in ActiveX/Java Uploader PHP
- Maintaining Sessions and Authentication in ActiveX/Java Uploader PHP
- Enabling Multi-threaded Upload via ActiveX/Java Uploader in PHP
- Debugging PHP ActiveX/Java Upload Scripts
- Uploading in Other Platforms
- Configuring and Handling Upload on Client Side
- Uploading Images
- Customizing User Interface
- Configuring Restriction Rules for Files
- Using ActiveX/Java Uploader at Runtime
- Troubleshooting
- Reference
- HTML5/Flash Uploader
- Licensing Information
- Legal Notices
Configuring ActiveX/Java Uploader PHP
Normally, default server configuration does not allow to upload files with ActiveX/Java Uploader. This topic describes how to configure a server you are going to deploy ActiveX/Java 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 in a single HTTP POST request. This value should be not less than number of user-selected files multiplied by converters number. If you are not sure what value to set, you can:- Specify a certainly greater value like
500. - Restrict number of files that a user can select to upload at once via the MaxFileCount property. In this case
max_file_uploadsshould be not less than MaxFileCount * converters number. - Use the FilesPerPackage property to set the number of user-selected files which ActiveX/Java Uploader can send in a single HTTP POST request and set
max_file_uploadsnot less than FilesPerPackage * converters number.
- Specify a certainly greater value like
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.
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.