Weird… Originally i thought that php was not correctly handling large file uploads (800mb-2gb)
now i’ve figured out that the file is moved correctly, but the mysql query that enters the file info into the DB seems to be skipped when large files are uploaded.
The mysql query is executed like it should be when small files are uploaded. This problem only seems to arise with larger files
Also, the mysql queries before the file is moved seem to work fine.
Process:
Wait for uploaded file,
check file size,
get md5 of file,
move file from temp folder to uploads folder,
if moving file is successful then mysql query.
The file is where is should be, but the query isnt executed.
Should i put a 10 second delay between after the file is moved and when the mysql query is called?
If the file move is working than the problem is most likely on the last step – the MySQL query. Max out the error level with
error_reporting(E_ALL)and setup a PHP error log – this will record any MySQL warnings and any other problems. Log the SQL query you’re trying to execute. Does it work from a MySQL client?