There could be some issues, I have listed down few of them.
- The web server's request buffering has to be disabled for this to work properly, else PHP may see the file upload only once fully uploaded.
- This feature doesn't work, when your webserver is running PHP via FastCGI.
- Don't forget, that the session has to be initialized before the form is generated, otherwise you will get no information in the session.
- It won't work in PHP 5.3 or earlier.
- Note that if you run that code and you print out the content of $_SESSSION[$key] you get an empty array due that session.upload_progress.cleanup is on by default and it cleans the progress information as soon as all POST data has been read. Set it to Off or 0 to see the content of $_SESSION[$key].
This can help you to track your progress bar http://pecl.php.net/package/uploadprogress
I hope this will help you to dig out the problem.