I am trying to do a simple image uploader. I have searched for hours now and I made sure to set the enctype and I also changed my php.ini according to what I wanna do. The permissions of the files and folders are also correct. I've tried the exact same code on another webserver and it's working. I am running apache2 with php5 on a raspberry pi.
HTML Code
<form method="post" enctype="multipart/form-data" action="upload.php">
<table>
<tr><td><input type="file" name="uimage"></td></tr>
<tr><td><input name="Submit" type="submit" value="Upload image"></td></tr>
</table>
</form>
PHP Code
var_dump($_FILES);
The PHP Code returns an empty array. var_dump($_POST);
works fine. On the other server both are working and the image uploads successfully. I assume it has to do with my server. I've checked the php.ini file and the 000-default in sites-enabled but really can not figure out what causes the issue.
This is what the error.log from apache2 says:
PHP Notice: Undefined index: uimage in /var/www/dmz/dotpic/upload.php on line 48, referer: http://localhost/upload.php
Edit:
By "POST" in the title of the question I mean the form method I am using. I am not trying to access the image using the $_POST
array. Sorry for that.