Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Christian Stocker's Blog:
Upload Progress Meter - Common issues and some answers
Mar 31, 2009 @ 09:31:49

On the Liip blog today Christian Stocker has posted about a few common issues developers seem to have with the upload progress meter extension and a few answers to help them out.

After I released uploadprogress 1.0.0 some days ago and finally declared it as stable, it's time to write that blogpost about some of the limitations and caveats one has to know.

The post links to a demo and answers a few different questions on issues such as:

  • Running it on other modules than mod_php on Apache ( like fastcgi)
  • Checking if files are too big
  • The position and content of UPLOAD_IDENTIFIER within the form is important
  • Why not use $_SESSION for the info?
  • It segfaults, when I don't include UPLOAD_IDENTIFIER

See the PECL page for the extension for more information.

tagged: upload progress meter pecl question answer common issue demo

Link:

Christian Stocker's Blog:
Upload Progress Meter for Windows - The next take
Mar 13, 2009 @ 09:38:35

Christian Stocker has posted about "the next take" on the PHP upload progress meter extension - a new version that plays a bit nicer on Windows than before.

The uploadprogress extension for PHP never really worked on Windows and since I don't have a Windows development environment I could never do a proper analysis of the problem. Until this week, when Tomas Holusa sent me an email telling me about some VCWD_RENAME problems on Windows.

A patch that was submitted a while back confirmed the issue and a new patch was written and submitted to take care of the problem. You can try out the new extension on Windows with either the normal Wind32 build or Win32 nts build.

tagged: upload progress meter windows patch vcwdrename fail extension

Link:

Michael Kimsal's Blog:
Lessons learned from a reddit overload
Jun 30, 2008 @ 12:04:27

Thanks to it being posted on reddit, the traffic to a certain post on Michael Kimsal's blog gave him a crash (literally?) course in high load management on a WordPress blog.

The blog post was voted up on reddit, and the server got slammed. So slammed, in fact, that it was unusable for a few hours while I investigated the problem. I didn't know the post was on reddit, but I knew I was getting some traffic.

He spent some time trying to get the Apache server to finally die off and give him back his machine, at least enough to get a feel for what was going on. Part of his problem was not having APC installed like he thought and the other part - WordPress. While friendly on the outside, it's apparently somewhat lacking on the inside.

tagged: reddit overload apc apache wordpress upload meter

Link:

Michael Kimsal's Blog:
Why do browsers still not have file upload progress meters?
Jun 26, 2008 @ 08:41:52

On his blog today Michael Kimsal asks a question that hasn't come up much in recent months - with all of the advancements browsers are adding in, why aren't there better hooks for measuring file downloads?

This current tirade stems from implementing a file upload progress meter in PHP5. Yes, PHP5.2 has some hook, and there's a PECL extension. [...] I realize this is partially a PHP issue I'm ranting about, but it's ultimately a hacky workaround to a basic piece of functionality that browsers should support.

He mentions an example where he basically directly asked a member of the IE team about it. It wasn't greeted seriously and still hasn't managed to be included in most of the popular browsers of today.

tagged: browser flie upload progress meter pecl extension apc

Link:

IBM developerWorks:
What's new in PHP V5.2, Part 5: Tracking file upload progress
May 18, 2007 @ 09:38:00

In a continuation of their series looking at what's new in PHP5, the IBM developerWorks site has posted part five, a look at the handy addition of the file upload progress functionality.

Given that uploading huge files can be tedious for impatient users, it is important to provide them positive feedback to keep them from giving up and going away.

Fortunately, PHP V5.2's new hooks into the file upload process allow us to show users in real time what is happening with their uploads. In this article, we will create a progress bar using PHP V5.2 for our users (see Download for source code).

They talk about what "hooks" are to explain how things work together before getting into the setup of the sample app. They chose to go with WAMP for their examples, but it can be easily adapted to any other flavor of *AMP setup of your choosing.

They set up a default upload box inside of a normal form the user can upload a file with. The real magic happens on the backend when the "Upload" button is hit. Via a handy call to the apc_fetch function, we can determine how far along the file is in the upload. This is relayed back to the script when their "Start me up!" link is clicked and a progress bar is advanced as the file is uploaded.

tagged: php5 feature fileupload progress meter hook apcfetch php5 feature fileupload progress meter hook apcfetch

Link:

IBM developerWorks:
What's new in PHP V5.2, Part 5: Tracking file upload progress
May 18, 2007 @ 09:38:00

In a continuation of their series looking at what's new in PHP5, the IBM developerWorks site has posted part five, a look at the handy addition of the file upload progress functionality.

Given that uploading huge files can be tedious for impatient users, it is important to provide them positive feedback to keep them from giving up and going away.

Fortunately, PHP V5.2's new hooks into the file upload process allow us to show users in real time what is happening with their uploads. In this article, we will create a progress bar using PHP V5.2 for our users (see Download for source code).

They talk about what "hooks" are to explain how things work together before getting into the setup of the sample app. They chose to go with WAMP for their examples, but it can be easily adapted to any other flavor of *AMP setup of your choosing.

They set up a default upload box inside of a normal form the user can upload a file with. The real magic happens on the backend when the "Upload" button is hit. Via a handy call to the apc_fetch function, we can determine how far along the file is in the upload. This is relayed back to the script when their "Start me up!" link is clicked and a progress bar is advanced as the file is uploaded.

tagged: php5 feature fileupload progress meter hook apcfetch php5 feature fileupload progress meter hook apcfetch

Link:

PHPClasses.org:
File upload progress meter for PHP 4, at last!
Dec 21, 2006 @ 10:46:00

With the release of PHP 5.2 and a new feature, the file upload hooks useful for making an upload progress meter, PHP 4 users have been feeling a little left out. Well, come into the light PHP4ers - PHPClasses has just what you need - two patches to give you the same functionality.

Since I wanted to use this upload progress meter extension under PHP 4, I had to find an alternative solution. I decided to port the patch that adds hooks to monitor upload progress to make it run under PHP 4.

These two patches work for different versions:

He also links to a few other resources of use to file uploaders out there:

tagged: file upload progress php4 php5 meter comet patch ajax file upload progress php4 php5 meter comet patch ajax

Link:

PHPClasses.org:
File upload progress meter for PHP 4, at last!
Dec 21, 2006 @ 10:46:00

With the release of PHP 5.2 and a new feature, the file upload hooks useful for making an upload progress meter, PHP 4 users have been feeling a little left out. Well, come into the light PHP4ers - PHPClasses has just what you need - two patches to give you the same functionality.

Since I wanted to use this upload progress meter extension under PHP 4, I had to find an alternative solution. I decided to port the patch that adds hooks to monitor upload progress to make it run under PHP 4.

These two patches work for different versions:

He also links to a few other resources of use to file uploaders out there:

tagged: file upload progress php4 php5 meter comet patch ajax file upload progress php4 php5 meter comet patch ajax

Link:

JSLabs Blog:
How to create a php upload progress meter
Dec 12, 2006 @ 07:21:22

In a new post to the JSLabs blog today, there's a mini-tutorial showing how to, with the help of the new hooks in PHP 5.2, create a file upload progress meter.

This progess meter is based on the yahoo user interface library and alternative php cache (APC). You will need both of these for it to display properly. PHP 5.2.0 or higher is also required. (I have written a previous article on alternative PHP cache here).

He gives a brief overview of how things work (including the php.ini setting to make it happen) and has a screenshot of the resulting output. You can check out the demo here or just grab the source and jump right in.

tagged: upload progress meter php5 apc rfc1867 demo source upload progress meter php5 apc rfc1867 demo source

Link:

JSLabs Blog:
How to create a php upload progress meter
Dec 12, 2006 @ 07:21:22

In a new post to the JSLabs blog today, there's a mini-tutorial showing how to, with the help of the new hooks in PHP 5.2, create a file upload progress meter.

This progess meter is based on the yahoo user interface library and alternative php cache (APC). You will need both of these for it to display properly. PHP 5.2.0 or higher is also required. (I have written a previous article on alternative PHP cache here).

He gives a brief overview of how things work (including the php.ini setting to make it happen) and has a screenshot of the resulting output. You can check out the demo here or just grab the source and jump right in.

tagged: upload progress meter php5 apc rfc1867 demo source upload progress meter php5 apc rfc1867 demo source

Link: