MultiPowUpload 3.1
Troubleshooting |
![]() ![]() |
Troubleshooting
Here you can find most often errors and problems that can occur while working with MultiPowUpload. Some articles are joined in groups and relate to the technology of the file processing code on server side.
Any HTTP error:
Read the following paragraph in case of any problems:All the HTTP errors and their short descriptions can be seen at w3.org website.
Lost session or authentication info
It is a known Flash Player bug, but Adobe still can't fix it.
FlashPlayer in non-IE browsers doesn't pass the cookies during the upload. Therefore, sessions are different on the page with Flash and upload script.
Workaround: MultiPowUpload sends cookies (and session ID) in "MultiPowUpload_browserCookie" Form filed value, but on server side you need some code that parses this value and sets to Cookies collection. MultiPowUpload includes ASP.NET (Global.asax in the root) and PHP samples.
There is another problem related to this bug: if the cookies marked as HTTPOnly on the web server, MultIPowUpload can't access them (because it uses JavaScript to get browser cookies).
If you have HTTPOnly mode enabled on your web server (most often on IIS server with ASP.NET 2.x and later), you should disable it in order to allow MultiPowUpload access cookies.
Solution for IIS server with ASP.NET:
<httpCookies httpOnlyCookies="false" />It is a parameter in the web.config file of your application, but for some reason this parameter won't work with .NET 2.0 Here is the sample global.asax file (place it into the root folder of your application) that marks all cookies as non-httponly:
<script runat="server"> void Application_EndRequest(object sender, EventArgs e) { if(Response.Cookies.Count > 0) foreach(string s in Response.Cookies.AllKeys) Response.Cookies[s].HttpOnly = false; } </script>
Solution for PHP (5.2 or above):
Set the value of the session.cookie_httponly parameter to false.
ini_set("session.cookie_httponly", 0);
ASP (ASP.OLD) file processing script
Error 403ASP.NET file processing script
Create a web application in the folder with the scriptIIS7 ASP.NET file processing script
HTTP Error 404.13 - Not Found<section name="requestFiltering" overrideModeDefault="Deny" />
<section name="requestFiltering" overrideModeDefault="Allow" />
PHP
Information related to files upload in PHPThe most common cause of problems related to the file uploads is PHP itself. The following php.ini settings effect the file uploads:
file_uploads boolean
Name |
Default |
Changeable |
Changelog |
file_uploads |
"1" |
PHP_INI_SYSTEM |
PHP_INI_ALL in PHP <= 4.2.3. Available since PHP 4.0.3 |
This parameter has to be set to 1 to accept file uploads, value 0 is not to accept the file uploads. Default value is 1.
post_max_size integer
Name |
Default |
Changeable |
Changelog |
post_max_size |
"8M" |
PHP_INI_PERDIR |
PHP_INI_SYSTEM in PHP <= 4.2.3. Available since PHP 4.0.3 |
This is the maximum size of a POST request that PHP will accept. The default for PHP 4.3.x is 8M. If the file(s) you are trying to upload have a single or combined size over this value, PHP will exit. It affects the total post data. For example, if it has been set to 8M and you are uploading four 3M files, PHP will not accept the files. You could, however, upload the four 3M files individually without a problem with this setting.
To upload large files, this value must be larger than upload_max_filesize.
If the memory limit is enabled by your configure script, memory_limit also affects the file uploading. Generally speaking, memory_limit should be larger than post_max_size.
If the size of post data is greater than post_max_size, the $_POST and $_FILES superglobals are empty. It can be tracked in various ways, e.g. by passing the $_GET variable to the script processing the data, i.e. <form action="edit.php?processed=1">, and then checking if $_GET['processed'] is set.
memory_limit integer
Name |
Default |
Changeable |
Changelog |
memory_limit |
"128M" |
PHP_INI_ALL |
"8M" before PHP 5.2.0, "16M" in PHP 5.2.0 |
It sets the maximum amount of memory in bytes that a script is allowed to allocate. It helps to prevent poorly written scripts for eating up all available memory on a server. Note that to have no memory limit, set this directive to -1.
upload_max_filesize integer
Name |
Default |
Changeable |
Changelog |
upload_max_filesize |
"2M" |
PHP_INI_PERDIR |
PHP_INI_ALL in PHP <= 4.2.3. |
This is the maximum size of an individual uploaded file. The default for PHP 4.3.x is 2M.
max_input_time ineger
Name |
Default |
Changeable |
Changelog |
max_input_time |
"-1" |
PHP_INI_PERDIR |
Available since PHP 4.3.0. |
This is the maximum time PHP will accept input in seconds.
Name |
Default |
Changeable |
Changelog |
upload_tmp_dir |
NULL |
PHP_INI_SYSTEM |
|
The temporary directory used for storing files when doing file upload. It must be writable by whatever user PHP is running. If non-specified PHP will use the system's default.
Definition of PHP_INI_* constants
Constant |
Value |
Meaning |
PHP_INI_USER |
1 |
Entry can be set in user scripts or in Windows registry |
PHP_INI_PERDIR |
2 |
Entry can be set in php.ini, .htaccess or httpd.conf |
PHP_INI_SYSTEM |
4 |
Entry can be set in php.ini or httpd.conf |
PHP_INI_ALL |
7 |
Entry can be set anywhere |
If you do not have access to change php.ini and your website is running on apache, you may be able to include these settings in an .htaccess file. It is possible only if "AllowOverride Options" or "AllowOverride All" privileges have been set (by you, by your ISP, or by a system administrator) in httpd.conf.
If it is feasible, or if you want to try the solution on your own, create or edit a file named .htaccess (assuming you want a 6Mb max attachment size):
php_value post_max_size "7M"
php_value upload_max_filesize "6M"
php_value max_input_time "120"
Permissions
If it is a Window server, nothing is required and by default the window gives all permissions.
For Linux and Unix you have to set write (Chmod) permission to both temp and destination directories to allow uploaded files to be stored.