This topic discusses how to deploy PHP demo applications on your server.
To find information about how a specific application works, see the Samples by Application topic.
PHP demo applications are located at the following folders of the Image Uploader SDK:
So, to install PHP demo applications just follow the steps below:
The most typical cause of this problem is a server-side limitation for the maximum POST request length. Usually, it is specified to reduce the risk of DoS attacks. If the request size exceeds some specific value, it is considered malicious, and the upload is broken. In this situation Image Uploader displays the following error message:
Upload failed (the connection was interrupted).
To increase the limit of the maximum upload size, you should edit your php.ini file and configure your server.
post_max_size = 100MB upload_max_filesize = 100MB
memory_limit
upload_tmp_dir
max_execution_time
To make sure that new settings are applied, use the phpinfo() function which outputs information about the current state of PHP.
<?php phpinfo(); ?>
If you use the Apache web server, you should also edit the php.conf file.
Change the LimitRequestBody
parameter according to the post_max_size
value, e.g.:
LimitRequestBody 104857600
For IIS 7:
Go to C:\Windows\System32\inetsrv\config\applicationHost.config
and change
<section name="requestFiltering" overrideModeDefault="Deny" />
to:
<section name="requestFiltering" overrideModeDefault="Allow" />
Add to your application's web.config
the following sections:
<system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength ="2147482624" /> <!-- in bytes --> </requestFiltering> </security> </system.webServer>
<system.web> <httpRuntime maxRequestLength="2097151"/> <!-- in kilobytes --> </system.web>
For IIS 6:
<system.web> <httpRuntime maxRequestLength="2097151"/> <!-- in kilobytes --> </system.web>
If you have URLScan installed and still experience this problem, go through the following steps:
Additionally, to reduce the length of the POST request sent by Image Uploader use the FilesPerOnePackageCount which specifies a number of files to send in a single request.