Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem when uploading files bigger than 500kb

Status
Not open for further replies.

LeoCano

Programmer
Jul 15, 2004
1
US
Hi,

We're using a php script to upload/download files to our server and when trying to upload files bigger than 500kb the browser redirects to the cannot find server error page. A friend told me that it might be a PHP.ini setting that needed to be changed and I went and modify php.ini but the problem persists.

Here's the advice I got and that's exactly what I did:

When you compose an email message using Horde PHP webmail and attach a file, it doesn't send the message. Plesk uses Horde, but this is not a Plesk problem.

This is probably due to the PHP.INI settings that allow Horde to process attachments. Even though the maximum file upload is not exceeded, memory size for the process is being exceeded. Check the memory size first. That is more than likely the problem.

Here are the specific settings for Horde attachment processing in PHP.INI:

/etc/php.ini: memory_limit = 60M ; needs to be 3 times larger than max upload/attach. Try 20 or 30 MB first. You don't want to cause RAM problems.
/etc/php.ini: file_uploads = On
/etc/php.ini: upload_max_filesize = 20M
/etc/httpd/conf.d/php.conf: LimitRequestBody 555555555

Before you make any changes, make a copy of the PHP.INI file and rename it PHP.INI.OLD. If something goes wrong with editing PHP.INI, delete it, then rename PHP.INI.OLD to PHP.INI

Any suggestions???

Thanx in advance

 
take a look at the script execution timeout settings of PHP and increase it.

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
Also take a look at (stabbing in the dark) apache (httpd.conf) change the server timeout, 30 seconds can be a little on the short side. Also searc the php forum using httpd.conf and php.ini as keywords, this has popped up a couple of times before.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top