Title: http error when uploading video
Last modified: August 31, 2016

---

# http error when uploading video

 *  Resolved [unalignedcoder](https://wordpress.org/support/users/unalignedcoder/)
 * (@unalignedcoder)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/http-error-when-uploading-video-1/)
 * 1) php settings and wp settings are ok; upload limits are ok;
 * 2) the same error happens with the browser uploader or the multiuploader;
 * 3) the video i’m trying to upload at this stage comes straight from my phone,
   downloaded to the pc — it has not been encoded by me and it plays fine so I don’t
   think it is corrupted. There’s something to the server or to the browser.
 * 4) I’ve tried with firefox and opera/chrome and both fail
 * 5) MIME types are fine both on the server mp4/video and on the browser.
 * 6)I’ve upgraded php to version 5.4 only for this and nothing changed.
 * WHAT DO??
 * (see a screenshot here: [http://i.imgur.com/QOVLZ1e.jpg?1](http://i.imgur.com/QOVLZ1e.jpg?1)
   
   btw, is this ‘http error’ verbosed anywhere in any log file?)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  [pixellanguage](https://wordpress.org/support/users/pixellanguage/)
 * (@pixellanguage)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/http-error-when-uploading-video-1/#post-6956141)
 * Please follow this thread.. [https://wordpress.org/support/topic/http-error-on-media-upload-wp-39?replies=39](https://wordpress.org/support/topic/http-error-on-media-upload-wp-39?replies=39)
 *  Thread Starter [unalignedcoder](https://wordpress.org/support/users/unalignedcoder/)
 * (@unalignedcoder)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/http-error-when-uploading-video-1/#post-6956266)
 * [@pixellanguage](https://wordpress.org/support/users/pixellanguage/): that thread
   is closed, so there’s nothing to follow.
 * Anyway I have
 * 7) installed the plugin “default to GD” and implemented the filter as suggested
   in that thread and nothing happened
 * 8) contacted my host, which added the ‘upload_tmp_dir’ value to the php config,
   and nothing happened
 *  [pixellanguage](https://wordpress.org/support/users/pixellanguage/)
 * (@pixellanguage)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/http-error-when-uploading-video-1/#post-6956270)
 * Are you on shared hosting by any chance? Shared hosts tend to limit the max uploadable
   file size on their end and there is nothing you can add to your scripts to change
   that. If not, then I am mistaken and this is not the solution you are looking
   for.
 * However, if you are on shared hosting it might pay to contact them and ask them
   the max allowed file sizes they allow their shared hosting accounts to have. 
   Some hosts however let you create a php.ini file, drop it into your site root
   directory set some hosting variables like upload limits, etc.
 * Try creating a file called ‘php.ini’ without the quotes and put in the following:
 *     ```
       upload_max_filesize = 64M
       post_max_size = 64M
       Then place the php.ini file you just created into your WordPress root directory.
       ```
   
 * A good way to see if it is your host or WordPress installation is to create a
   simple file uploading test and then try uploading the same file. If you have 
   the same issue, it isn’t WordPress and is your server configuration.
 * Create a page called “file.php” and then add in the following code:
 *     ```
       <form enctype="multipart/form-data" action="upload.php" method="POST">
           <input type="hidden" name="MAX_FILE_SIZE" value="512000" />
           Send this file: <input name="userfile" type="file" />
           <input type="submit" value="Send File" />
       </form>
       ```
   
 * Now create a file called “upload.php” and add in the following:
 *     ```
       <?php
   
           $uploaddir = 'uploads';
           $uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
   
           echo "<p>";
   
           if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
             echo "File is valid, and was successfully uploaded.\n";
           } else {
              echo "Upload failed";
           }
   
           echo "</p>";
           echo '<pre>';
           echo 'Here is some more debugging info:';
           print_r($_FILES);
           print "</pre>";
   
       ?>
       ```
   
 * Now see if that lets you upload a large file. If not, then I’ll further try and
   debug your WordPress installation to try and rectify the issue.
 *  Thread Starter [unalignedcoder](https://wordpress.org/support/users/unalignedcoder/)
 * (@unalignedcoder)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/http-error-when-uploading-video-1/#post-6956293)
 * please read the thread if you want to help…! 🙂 the first thing I said was that
   the limits were correctly raised. I have 256M on all three instances. My hosting
   service is actually quite helpful and I highly recommend them (webhostingbuzz).
 * Regarding the upload test, could you be a little more specific on how to use 
   these two files? I am not familiar with the `$_FILES` post method.
 *  [pixellanguage](https://wordpress.org/support/users/pixellanguage/)
 * (@pixellanguage)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/http-error-when-uploading-video-1/#post-6956298)
 * Ok for testing just create 2 files called file.php and upload.php with following
   code and try access file.php in browser and upload the file and see what happens.
 *  Thread Starter [unalignedcoder](https://wordpress.org/support/users/unalignedcoder/)
 * (@unalignedcoder)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/http-error-when-uploading-video-1/#post-6956307)
 * I did the test and the file upload.php uploads OK. Then I tried with a real video
   file and I just got a “connection reset”, same as when I use the regular uploader
   within wordpress. No helpful messages at all.
 *  [pixellanguage](https://wordpress.org/support/users/pixellanguage/)
 * (@pixellanguage)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/http-error-when-uploading-video-1/#post-6956310)
 * It really seems some setting related to server.. you can send this uploading 
   test detail to server guy and see what happen… it is definitely not related to
   wordpress…
 *  Thread Starter [unalignedcoder](https://wordpress.org/support/users/unalignedcoder/)
 * (@unalignedcoder)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/http-error-when-uploading-video-1/#post-6956340)
 * The host eventually said that the problem is given by a “mysql limit” that cannot
   be changed because it would affect all sharing guests (I wanna say: let’s raise
   the limit for everyone, but OK).
    Honestly I am not convinced they have nailed
   it, might as well be they have given up figuring it out since we went on for 
   a couple of weeks on this.
 *  [pixellanguage](https://wordpress.org/support/users/pixellanguage/)
 * (@pixellanguage)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/http-error-when-uploading-video-1/#post-6956341)
 * so change hosting 😉
 *  Thread Starter [unalignedcoder](https://wordpress.org/support/users/unalignedcoder/)
 * (@unalignedcoder)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/http-error-when-uploading-video-1/#post-6956347)
 * I think you’re right, I thought they were doing their best, but I’ve looked this
   thing up and this “mysql” upload limit doesn’t make any sense.
 * How can a SQL limit affect uploading files via php? Your test doesn’t use SQL
   and yet uploading fails.
 * Stupid question, but have you ever heard of a mysql limit that can affect uploading
   files (other than sql files to phpmyadmin)??
 *  Thread Starter [unalignedcoder](https://wordpress.org/support/users/unalignedcoder/)
 * (@unalignedcoder)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/http-error-when-uploading-video-1/#post-6956355)
 * Eventually my hosting service came through, as they decided the problem was with
   the limit set in Ngix. They raised it to 200 mb and now I can finally upload 
   videos!
 * Of course, the player doesn’t work in Firefox (“error loading this resource”)
   But I guess that’s matter for another thread. :/
 *  [pixellanguage](https://wordpress.org/support/users/pixellanguage/)
 * (@pixellanguage)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/http-error-when-uploading-video-1/#post-6956356)
 * Awesome!!

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘http error when uploading video’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 12 replies
 * 2 participants
 * Last reply from: [pixellanguage](https://wordpress.org/support/users/pixellanguage/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/http-error-when-uploading-video-1/#post-6956356)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
