Hi there, I have created a simple upload form on a pretty vanilla LAMP installation running on a fedora 16 VM. I have set “file_uploads” to “on” and “upload_max_filesize” to “200M” from its original “2M” setting (my phpinfo() confirms this)
however, whenever I try to upload anything over 2M, it uploads a blank file with the correct name. under 2M works like a dream …are there any other settings i should be setting anywhere to get this to work ?
my simple scripts is
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
$thisfile = $_SERVER['PHP_SELF'];
$message = '
<form enctype="multipart/form-data" method="post" action="'.$thisfile.'">
<input type="file" name="file" />
<br />
<input type="submit" name="submit" value="submit" />
';
if (!isset($_POST['submit'])) {
echo $message;
} elseif ($_POST['submit'] == 'submit') {
$uploaddir = '/var/www/html/uploads/';
$uploadfile = $uploaddir . basename($_FILES['file']['name']);
if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile)) {
echo "File move worked";
} else {
echo "File Move hasnt worked";
}
} else {
$message = 'Damn it';
echo $message;
}
?>
Like I say, the script works fine, just something is stopping it from uploading greater than 2M
any help our guidance would be greatly appreicated
Gary