*SOLVED* Large File Upload
Posted: Tue Apr 08, 2008 3:52 am
Hi,
Not sure if this is the correct place, but it seems to me to be...
I have an upload script which is working for smaller files, but weirdness occurs with large files.
When I upload files of 5Mb it works a treat, but if I try and upload a 16Mb file, it sits there for a while and then just re-presents the blank form. Look at the logs, it doesn't seem clear as to whether it has actually contacted the server or not. Usually when I upload files that are over the allowed limit I get an error, but this just reloads the upload form? I going to continue to try and debug, but was hoping that other people may have come across this weirdness?
Snippet from php.ini
Snippet of the form:
Snippet of the action.php script:
Uploading a smaller file results:
Not sure if this is the correct place, but it seems to me to be...
I have an upload script which is working for smaller files, but weirdness occurs with large files.
When I upload files of 5Mb it works a treat, but if I try and upload a 16Mb file, it sits there for a while and then just re-presents the blank form. Look at the logs, it doesn't seem clear as to whether it has actually contacted the server or not. Usually when I upload files that are over the allowed limit I get an error, but this just reloads the upload form? I going to continue to try and debug, but was hoping that other people may have come across this weirdness?
Snippet from php.ini
Code: Select all
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =
; Maximum allowed size for uploaded files.
upload_max_filesize = 50M
Code: Select all
<form id="upload" name="upload" method="post" enctype="multipart/form-data" action="/media/action.php">
<input type="file" name="MediaFile" id="uploadMediaFile" name="MediaFile" />
Max. file size ~<?=ini_get('upload_max_filesize')?>
</form>
Code: Select all
<?php
print_r($_FILES);
?>
Code: Select all
Array ( [MediaFile] => Array ( [name] => 3.7Mb.mp3 [type] => application/x-crossover-mp3 [tmp_name] => /tmp/phpAEG0Gk [error] => 0 [size] => 3796323 ) )