I have PHP 7 running a built in server on my windows 10 machine like so:
C:\Users\user>php -S 0.0.0.0:3001 -c php.ini
Where index.php is
<?php
error_log(print_r($_FILES));
$new_image_name = "test.mp4";
ob_start();
var_dump($_FILES);
error_log(ob_get_clean(), 4);
move_uploaded_file($_FILES["file"]["tmp_name"], "C:\\".$new_image_name);
?>
and php.ini configured to allow big files since I'm trying to get a movie file.
Anyway, when the file transfer is complete, this is what my var_dump shows
PHP 7.0.11 Development Server started at Wed Oct 12 14:14:26 2016
Listening on http://0.0.0.0:3001
Document root is C:\Users\user
Press Ctrl-C to quit.
[Wed Oct 12 14:16:07 2016] 1
[Wed Oct 12 14:16:07 2016] array(1) {
["file"]=>
array(5) {
["name"]=>
string(10) "mytest.mp4"
["type"]=>
string(9) "video/mp4"
["tmp_name"]=>
string(44) "C:\Users\user\AppData\Local\Temp\phpD528.tmp"
["error"]=>
int(0)
["size"]=>
int(3604790)
}
}
However, C:\Users\user\AppData\Local\Temp\phpD528.tmp never exists, and neither does C:\test.mp4
I have given full permissions to the \Temp\ folder.. I don't know what else to try