Jump to content

File Upload Max Size


JoshBurton

Recommended Posts

Hey guys,

 

Been trying to get a php file upload script working and the forums have helped, but still can't figure it all out. I think It may be something beyond my control on the server side.

 

I've checked in cPanel and php's max file size is 20M, yet I'm only able to upload ~8Mb files. In testing I found that if files are larger, the $_FILES array is empty (ie - so no error messages), but $_SERVER[content_length] has a value. This leads me to think that the file is larger than the php.ini directive post_max_size from some research. I could be completely off too, I'm not the most familiar with this.

 

The code I'm using can be seen at:

 

http://joshb.co.cc/upload.php

 

You can test it to see if you can generate a informative error, or just see the situation. Try with an mp3.

 

acct: joshb2

 

Any help is much appreciated!

 

Cheers,

Josh

Link to comment
Share on other sites

It could be that your upload file doesn't allow .mp3 extensions.

Most upload scripts only work for image files.

 

 

Hey,

Take a look at the code written at the bottom of:

http://joshb.co.cc/upload.php

 

It should work for mp3, and it does. Provided the filesize is <8Mb. If it it larger, $_FILES[...][...] is empty so nothing in the end gets uploaded, and there is no returned error. Thanks for your help. Any ideas?

 

Josh

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...