PHP 5.4.0 File Upload Progress

software development

#1

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: http://files.pceasies.com/info.php

Upload file

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

print_r($_SESSION);
print_r($_FILES);
?>
<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">           
</form>

Progress file
[php]

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

[/php]

$_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.


#2

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


#3

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.