i cannot seem to get php to process uploaded files at all. my current code looks like this:
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
?>
<html>
<body>
<form action="" method="POST" enctype="multipart/form-data">
<input type="file" name="image">
<input type="submit">
</form>
<p>Sent file: <?php echo $_FILES['image']['name']; ?></p><br>
<p>File size: <?php echo $_FILES['image']['size']; ?></p><br>
<p>File type: <?php echo $_FILES['image']['type']; ?></p><br>
<?php print_r($_FILES); ?>
</body>
</html>
my php.ini file:
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
; http://php.net/file-uploads
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system
default if not
; specified).
; http://php.net/upload-tmp-dir
;upload_tmp_dir =
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 10000M
; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20
and upon uploading litterally anything i get:
Sent file:
Notice: Undefined index: image in
/var/www/upload.php on line 13
File size:
Notice: Undefined index: image in
/var/www/upload.php on line 14
File type:
Notice: Undefined index: image in
/var/www/upload.php on line 15
Array()
it is most likely glaringly obvious, but for the life of me i cant find what i am doing wrong.