I am testing an internal website with this code:
if (move_uploaded_file($_FILES[$file_array_name]['tmp_name'], $target))
{
some code......
header("Refresh: 2; url=some url");
}
else
{
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(-1);
print_r(error_get_last());
echo "Sorry, there was a problem uploading your file.";
}
}
When I run it, I can see the echo statement but none of the errors.
Here's the settings for my php.ini:
php --info | grep "error"
display_errors => STDOUT => STDOUT
display_startup_errors => On => On
error_append_string => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => 24575 => 24575
html_errors => Off => Off
The file that is causing the error is 305MB, and it works for smaller sized files. So I was wondering if that was the error..
Here are some more values from php.ini:
memory_limit = 400M
upload_max_filesize = 400M
post_max_size = 400M