I have the following form:
<form name="upload_temp" id="upload_temp" action="index.php?action=upload_temp" method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="3000000" />
<input type="file" name="upload_file" id="upload_file" src="images/btn_browse.gif" border="0">
And in my php.ini file I set huge values for the following parameter:
max_execution_time = 320 ; Maximum execution time of each script, in seconds
max_input_time = 320 ; Maximum amount of time each script may spend parsing request data
memory_limit = 3000M ; Maximum amount of memory a script may consume
; Maximum size of POST data that PHP will accept.
post_max_size = 3000M
; Maximum allowed size for uploaded files.
upload_max_filesize = 300M
So the upload works for some files, but failing to complete the upload for some others. When I print the $_FILES['upload_file']['error'] for the files that fail to upload, I get error message code 1: "UPLOAD_ERR_INI_SIZE Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini."
But as you can see, my php.ini is set to have good enough values to handle the file. I do notice though that the files that fail to upload are the ones that are size bigger than around 1900KB, how can I troubleshoot what is failing? Could it possibly be I don't have enough physical memory in my server to handle the upload files past a certain size? Shouldn't the server then be using virtual memory automatically as long as I set this to be a big size on php.ini?