Big size file upload problem in PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sandeept
Forum Newbie
Posts: 15
Joined: Wed Sep 10, 2008 2:15 am

Big size file upload problem in PHP

Post by sandeept »

Hi,

My server has CentOS, Apache and PHP.
I have set all required parameters in php.ini to handle big size file uploads (post_max_size, memory_limit, timeouts etc.)

But, still the script doesn't accept a file more than 5MB. On bigger uploads, it returns error 7 (Unable to write to disk).
I have set 777 permissions on my temporary folder (/opt/php) and during upload, I do see temporary file through my FTP. But, once it reaches 5MB, temporary file disappears and script shows error 7.

I increased timeout value in httpd.conf and set following too,
<Directory "/opt/php">
LimitRequestBody 10485760
</Directory>
But, no success.

Please help.

Thanks,
Sandeep
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Big size file upload problem in PHP

Post by requinix »

That error means exactly what it says: PHP cannot write to the temporary file. Is there anything special about the /opt/php folder? Any kind of disk or user quota in effect? What happens if you try creating a large file there manually?
sandeept
Forum Newbie
Posts: 15
Joined: Wed Sep 10, 2008 2:15 am

[Closed] Big size file upload problem in PHP

Post by sandeept »

Hi,

Sorry for late response.

The temporary directory was out of quota. I set a new directory path in php.ini and upload is working fine.
Thanks for your inputs.

Weird part is, I am able to upload big size files through FTP in the directory (/opt/php) which says "Out of quota".

Thanks,
Sandeep
Post Reply