Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress: "HTTP Error." When Uploading Files

I'm running WP 3.0.1 on a shared host using PHP5. I'm having issues uploading files that are a little larger via the media uploader in the admin section of WP.

Every time I try to upload a file thats over a few megabytes, it uploads, says its crunching, then gives me a big red "HTTP Error." - nothing more.

This only happens on files that are a little larger - ie a 20mb .mp3 file. A 5mb file seems to work fine. Whats weird is in the past we've uploaded 40mb files without a problem.

--

Here's the steps I've taken so far to try and remedy the situation:

  1. Double checked php.ini to ensure increase upload, post and memory size were high enough.
  2. Updated .htaccess to include filter the security mod I found elsewhere.
  3. Double checked all file permissions via ftp to ensure they were 755.
  4. Called the host - "They don't support 3rd party scripts" (I hate IPower)
  5. Tried with different audio files of similar size.
  6. Disabled all plugins

--

Do you guys have any more ideas regarding what might be causing the vague "HTTP Error." problem?

Thanks in advance.

like image 709
Will D. White Avatar asked Nov 03 '10 19:11

Will D. White


1 Answers

I had a similar problem with Nginx and PHP5-FPM (and WordPress 4.1).

Symptoms: the file (< 5MB, so relatively small) is partway through the transfer, as indicated by the progress bar, when suddenly you get the HTTP error message.

Even if you've set upload_max_filesize in your php.ini, you should also check post_max_size is (at least) as big. Remember to restart php5-fpm.

If it still doesn't work, edit your nginx.conf file (in Debian/Ubuntu it's /etc/nginx/nginx.conf) and add this in the http block:

client_max_body_size 100m;

Then restart Nginx.

like image 72
William Turrell Avatar answered Oct 05 '22 23:10

William Turrell