Table of Contents

Archive Only

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:

1.build PHP 5.3.1 + LSAPI 5.2

Install PHP 4/5 with LSAPI

2.build uploadprogress extension

~>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

3. start to test

~/uploadprogress-1.0.1>cp -r examples /path/to/DocumentRoot

test url:

yourdomain.com/examples/index.php

4.File Uploads Configuration Options

in PHP, refer http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize

NameDefaultChangeableChangelog
file_uploads“1”PHP_INI_SYSTEMPHP_INI_ALL in PHP ⇐ 4.2.3. Available since PHP 4.0.3
upload_tmp_dirNULLPHP_INI_SYSTEM
upload_max_filesize“2M”PHP_INI_PERDIRPHP_INI_ALL in PHP ⇐ 4.2.3
max_file_uploads20PHP_INI_ALLAvailable since PHP 5.2.1
post_max_size“8M”PHP_INI_PERDIRPHP_INI_SYSTEM in PHP ⇐ 4.2.3. Available since PHP 4.0.3

in Litespeed:

Server-->Tuning-->Max Request Body Size (bytes)