I'm having a weird problem with file uploads with Apache/PHP 5.3 on a SLES 11 SP2
When I try to upload a file PHP only pick up the files original name ($_FILES['name']
), and not all the other vars I need.
I have checked and double cheched my php.ini
both for upload max file, put max size, file upload enabled etc.
Does anybody have an idea what is going on?
Here is the script I used to test it:
<?php
if(isset($_FILES)) {
var_dump($_FILES);
}
?>
<!-- The data encoding type, enctype, MUST be specified as below -->
<form enctype="multipart/form-data" action="/" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
<!-- Name of input element determines name in $_FILES array -->
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>
And this is what I receive:
array(1) { ["userfile"]=> array(1) { ["name"]=> string(8) "test.txt" } }