OVH Community, votre nouvel espace communautaire.

Progress Meter Installation

27/12/2006, 23h57
Installation Time - 10 min or less depending on Service Administration Skills

1)cd /usr/src
3)tar -zxvf upload-progress-meter-v4.1.tgz
4)cd upload-progress*
5)cd php-patch/ && ls -l
6)Copy patch into php Directory, in my case both php and progress meter were download to /usr/src

so my command will be:
cp patch.upload-progress-callback-v4.1-for-php4.3.10.txt ../../php-4.4.4
and to check -> ls -l ../../php-*

7) cd ../../php-4.4.4

7) Now I can patch my php
Patch php using patch.upload-progress-callback-v4.1-for-php4.3.10.txt

patch -p1 < patch.upload-progress-callback-v4.1-for-php4.3.10.txt
It was succesful and this is the result I achieved
================================================== ============================
patch -p1 < patch.upload-progress-callback-v4.1-for-php4.3.10.txt
patching file main/rfc1867.c
Hunk #1 succeeded at 129 with fuzz 2 (offset 1 line).
Hunk #2 succeeded at 795 (offset 4 lines).
Hunk #3 succeeded at 877 (offset 1 line).
Hunk #4 succeeded at 944 (offset 5 lines).
Hunk #5 succeeded at 967 (offset 1 line).
Hunk #6 succeeded at 1026 with fuzz 2 (offset 6 lines).
Hunk #7 succeeded at 1250 (offset 8 lines).
================================================== ========================

7)nano /usr/local/apache/htdocs/info.php

8) add these lines

Save file then go to

Keep this file open it will reveal the location of 4 important factors
Your current PHP version
Current configure lines
Location of php.ini

9)Now you're ready to compile php with knowledge of this information,
for example with prefix (example -> /usr/local/php)

10) Copy your configure lines in info.php(step 8)
In my case
./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-mysql=/usr/local/mysql2' '--prefix=/usr/local/php' '--with-zlib=/usr/local/zlib' '--with-openssl=/usr/local/ssl' '--enable-fastcgi' '--enable-memory-limit' '--enable-zend-multibyte' '--with-bz2' '--enable-shmop' '--enable-safe-mode' '--enable-sigchild' '--enable-bcmath' '--with-freetype-dir=/usr/local/freetype' '--with-gd=/usr/local/gd' '--enable-gd-native-ttf' '--enable-mbstring' '--with-mm=/usr/local/mm' '--enable-inline-optimization' '--disable-debug'

11) If not in the location of where you downloaded php to, then go to it
i.e /usr/src/php-4.4

when php is installed go into upload-progress-meter-v4.1/upload_progress_meter
12) cd /usr/src/upload-pr*/upload_progress_meter && ls -l
You should see the config file dir
and do:

13) /usr/local/php/bin/phpize (depending on where you php is installed, find this information from your

./configure --with-php-config=/usr/local/php/bin/php-config
make install

14) now full path to upload-meter extension should be:
where XXXXXXXX = date numbers, may be differend than the one i have so it need to be checked.

So in your php.ini file, find "extension_dir"
In this case it was extension_dir=/usr/local/php/lib/php/extensions, so the config lines will be


But use your exact extension_dir lines by going into your php,ini

In httpd.conf in your domain add:
--- cut cut ---
php_value upload_progress_meter.store_method "file"
php_value upload_progress_meter.file 1
php_value upload_progress_meter.file.filename_template "/tmp/uploadbar/upl_%s.txt"
--- cut cut ---

now you need to create one directory:

12) mkdir /tmp/uploadbar && chmod 777 /tmp/uploadbar

now restart your apache and verify using test files in 'live-demo' dir or via phpinfo() function.