Jump to content

large file uploads


barrylee

Recommended Posts

Hi, can anyone advise,

I have wriiten a script for users to upload mp3 files to the site directory, it works fine on files less than 5-6 mb but not on files larger than that. I have created a cutom ini file as below;

 

print ini_set("max_execution_time", "0") . "<br />";

print ini_set("max_file_upload", "20mb") . "<br />";

print ini_set("max_post_size", "20mb");

 

It appears to copy up files over 10 mb but then bombs out at the last second and gives me the custom error message. I am using the following for my file upload;

 

if(move_uploaded_file($_FILES ........ etc

 

Pleeeeeese help!

Link to comment
https://forums.phpfreaks.com/topic/124532-large-file-uploads/
Share on other sites

Sorry this is in html stuff, but it's basically the error codes:

<tr valign='top'><td>UPLOAD_ERR_OK</td><td><b>Value: 0;</b> There is no error, the file uploaded with success.</td></tr>\n
<tr valign='top'><td>UPLOAD_ERR_INI_SIZE</td><td><b>Value: 1;</b> The uploaded file exceeds the upload_max_filesize directive in php.ini.</td></tr>\n
<tr valign='top'><td>UPLOAD_ERR_FORM_SIZE</td><td><b>Value: 2;</b> The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.</td></tr>\n
<tr valign='top'><td>UPLOAD_ERR_PARTIAL</td><td><b>Value: 3;</b> The uploaded file was only partially uploaded.</td></tr>\n
<tr valign='top'><td>UPLOAD_ERR_NO_FILE</td><td><b>Value: 4;</b> No file was uploaded.</td></tr>\n
<tr valign='top'><td>UPLOAD_ERR_NO_TMP_DIR</td><td><b>Value: 6;</b> Missing a temporary folder. Introduced in PHP 4.3.10 and PHP 5.0.3.</td></tr>\n
<tr valign='top'><td>UPLOAD_ERR_CANT_WRITE</td><td><b>Value: 7;</b> Failed to write file to disk. Introduced in PHP 5.1.0.</td></tr>\n
<tr valign='top'><td>UPLOAD_ERR_EXTENSION</td><td><b>Value: 8;</b> File upload stopped by extension. Introduced in PHP 5.2.0.</td></tr>\n

Link to comment
https://forums.phpfreaks.com/topic/124532-large-file-uploads/#findComment-643111
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.