PECL package “uploadprogress” is an PHP extension to track progress of a file upload.
In the website, it states “It is only known to work on Apache with mod_php, other SAPI implementations unfortunately still have issues. At least PHP 5.2 is needed.”
We tested, the extension also works with Litespeed since 4.1.
test environment:
Litespeed 4.1RC2
PHP 5.3.1 + LSAPI 5.2
uploadprogress 1.0.1
Steps:
~>wget http://pecl.php.net/get/uploadprogress-1.0.1.tgz
~>tar zxvf uploadprogress-1.0.1.tgz
~>cd uploadprogress-1.0.1
~/uploadprogress-1.0.1>/php5install/php5/bin/phpize
~/uploadprogress-1.0.1>./configure --enable-uploadprogress --with-php-config=/php5install/php5/bin/php-config
~/uploadprogress-1.0.1>make
~/uploadprogress-1.0.1>make install
in php.ini, add
extension=uploadprogress.so
~/uploadprogress-1.0.1>cp -r examples /path/to/DocumentRoot
test url:
yourdomain.com/examples/index.php
in PHP, refer http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize
| Name | Default | Changeable | Changelog |
| file_uploads | “1” | PHP_INI_SYSTEM | PHP_INI_ALL in PHP ⇐ 4.2.3. Available since PHP 4.0.3 |
| upload_tmp_dir | NULL | PHP_INI_SYSTEM | |
| upload_max_filesize | “2M” | PHP_INI_PERDIR | PHP_INI_ALL in PHP ⇐ 4.2.3 |
| max_file_uploads | 20 | PHP_INI_ALL | Available since PHP 5.2.1 |
| post_max_size | “8M” | PHP_INI_PERDIR | PHP_INI_SYSTEM in PHP ⇐ 4.2.3. Available since PHP 4.0.3 |
in Litespeed:
Server–>Tuning–>Max Request Body Size (bytes)