PHP 5.4.0 File Upload Progress

software development


I wanted to test out PHP 5.4’s new file upload progress features so I set it up on a domain I use for testing/messing around.
PHP Info:

Upload file

if(isset($_POST) && isset($_FILES['file'])){
	if( $_FILES['file']['error'] == 0 ) {
		move_uploaded_file($_FILES['file']['tmp_name'], "uploads/".$_FILES['file']['name']);

<form name="upForm" enctype="multipart/form-data" action="basic.php" method="post">
        	Upload File
			<input type="hidden" name="PHP_SESSION_UPLOAD_PROGRESS" value="upload">
            <input type="file" name="file">                  
            <input type="submit" value="UPLOAD FILE">           

Progress file

<?php session_start(); var_dump($_SESSION); ?>


$_SESSION never has anything in it unless I set something. (It should populate with upload information?)
I’ve tried other premade scripts online and they don’t work either so I’ve come to the conclusion it must be a configuration error somewhere.


… and have you checked the session id to see if you are dealing with the same session?


I set a session variable on the upload page and can access it from the progress page so it appeared to be the same session.