Upload Error

Permalink 2 users found helpful
I keep getting this error when I try to upload:

An unknown error occurred while uploading the file. Please check that file uploads are enabled, and that your file does not exceed the size of the post_max_size or upload_max_filesize variables.

File Uploads: 1
Max Upload File Size: 400M
Post Max Size: 400M

The file is well below the limit and the permissions for the entire site are 7-7-7. Any suggestions?

 
globalnerds replied on at Permalink Reply
globalnerds
You could try adding this to your index.php - at the top:

ini_set('memory_limit','128M');//this should do
ini_set('post_max_size','64M');//maybe this too 
ini_set('upload_max_filesize', '32M');//may not need this
set_time_limit(60);//only needed if you are processing large amounts of large files


I can't remember if you need to change the post_max_size or upload_max_filesize but you could try one at a time to see which one works.
mattcalvo replied on at Permalink Reply
Thanks. Tried it but still get the same error.
globalnerds replied on at Permalink Reply
globalnerds
I would try calling your hosting provider and asking them about this issue and what they have set for php.ini (this is usually only accessible via root). They might also have some other suggestions regarding changes.

Can you send me your .htaccess file and index.php files and I will take a look at them.

There should not be any information in there that would allow me to get into your system.
mattcalvo replied on at Permalink Reply
Can you give me an e-mail address to send those files to? My site manager sen them to me as attachments and I can only open one to copy and paste. I'd just be easier for me to forward you the email.