So my host is being ridiculous. I have made a sample script:
<?
//This is the entire page
ini_set("memory_limit","100M");
if ($_GET['addIMG'] == "yes")
{
foreach ($_FILES as $key => $value)
{
echo "<b>$key: $value</b><br>";
if (trim($value) == "Array")
{
echo "----<br>";
foreach ($_FILES[$key] as $key2 => $value2)
echo "$key2: $value2<br>";
}
}
echo "Done";
}
?>
<form action='upload_test.php?addIMG=yes' method='post' enctype='multipart/form-data'>
<input type="file" name="mainpic"><br />
<input type='submit' class='submit' value='Test File'></td>
</form>
Any small file upload works fine and outputs something like:
name: Buy_Now.gif
type: image/gif
tmp_name: /tmp/phpcZl8ZZ
error: 0
size: 475
Whereas a larger file (4MB when the limit has been set to 20MB in php.ini) says this:
name: Missing.mp3
type:
tmp_name:
error: 1
size: 0
Any ideas how this could be me and not the server?