I have problem with uploading files via http on sites. Problem is that I can not upload files larger than about 126 KB. Problem is I believe server related because I have few sites on VPS and on all I have same problem.

For example if I try to upload files using widely used PHP contact form, or trough CMS on sites I just get error 500 or 404 page when I try to upload any file larger than about 126-127 KB. If file is smaller, everything is OK.

I uploaded larger files before. I can not tell when this started because I did not tried to upload files for few months. Only I can think off is that it worked before few months before setting PHP with mod_fcgi (maybe this is not relevant at all).

Also there is no any errors, there is no error_log in root of site, or in any other folder.

Is there anything I can check?

System info: 2 GB RAM CPU is a dual quad-core E5440 Xeon (2.83GHz).

Running Linux 2.6.18-028stab099.3, x86_64.

(Unix) mod_ssl/2.2.22 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/ mod_fcgid/2.3.6

memory_limit is 96M
upload_max_filesize 32M
post_max_size 8M
max_execution_time 30
max_input_time 60
  • Check where PHP store tempfiles during upload. Looks like PHP hasn't enough space to store tempfile. – Kondybas Jul 18 '12 at 10:34
  • Do you mean on "upload_tmp_dir" in php.ini? It is set to default. – Advanced SEO Jul 18 '12 at 11:23
  • I am using about 30% of my VPS space limit. – Advanced SEO Jul 18 '12 at 11:23
  • Is there anything else I should look at? – Advanced SEO Jul 18 '12 at 11:24
  • Also "session.save_path" is set to "/tmp". – Advanced SEO Jul 18 '12 at 11:26

Try changing MB to M on your upload_max_filesize line.

See this reference in the php manual.

Not sure if php is ignoring the B or not but it is worth a try.

  • It is just M, not MB. I can see "upload_max_filesize 32M" in PHP Configuration Editor (which write php.ini). But thanks, any other solution maybe, I still have this problem. – Advanced SEO Sep 25 '12 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.