PHP Classes

patch for upload_progress.php

Recommend this page to a friend!

      PHP Forms Class with HTML Generator and JavaScript Validation  >  PHP Forms Class with HTML Generator and JavaScript Validation package blog  >  How to Show Google Ma...  >  All threads  >  patch for upload_progress.php  >  (Un) Subscribe thread alerts  
Subject:patch for upload_progress.php
Summary:How to proceed to apply te rfc1867.php-4.4.4.patch ?
Messages:2
Author:Jos Reuter
Date:2006-12-21 14:56:09
Update:2006-12-21 15:29:19
 

  1. patch for upload_progress.php   Reply   Report abuse  
Picture of Jos Reuter Jos Reuter - 2006-12-21 14:56:09
Hello,

Can you please explain me how to proceed to apply the rfc1867.php-4.4.4.patch ?

I am very impresnionned about your working example but the progress bar does nor appear on my hosting (php 4.4.)

Many thanks

Jos

  2. Re: patch for upload_progress.php   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2006-12-21 15:29:19 - In reply to message 1 from Jos Reuter
You need to unpack PHP 4.4.4 source archive and copy the patch to the php-4.4.4/main and enter in that directory. Then, assuming you are using Linux or some other Unix (*BSD or Mac OS X maybe), apply the patch using the command:

patch <rfc1867.php-4.4.4.patch

Now you can rebuild and re-install PHP with the usual commands:

./configure some-configure-options-here
make
make install

If you are using PHP as module built-in Apache, you also need to rebuild and reinstall Apache.

As I mentioned the upload progress meter requires also the uploadprogress extension from PECL:

pecl.php.net/package/uploadprogress

Download that extension archive into some directory, enter in that directory, and run these command

phpize
./configure --enable-uploadprogres
make
make install

You probably need to run as root to run the make install command.

Then you need to enable the upload progress extension module adding this line to php.ini .

extension=uploadprogress.so

Once you have done all this, you need to restart your Web server (stop and start if PHP is built-in Apache module).

To make sure all went well, execute a PHP script with the phpinfo(); command. You should see the uploadprogress extension listed there, otherwise one of the steps above has failed.