The uploaded file was only partially uploaded

“The uploaded file was only partially uploaded” Error

Background:

Having functioned correctly for years, I was confronted with the ” Uploaded file was only partially uploaded” error when trying to upload media files for an article. This error seems to have occurred since upgrading to the latest version of WordPress – 4.1.1

Solution:

Some solutions advocate changing the upload directory permissions to 777 which, apart from being a gaping security hole, does not help in all situations and certainly not this one.

The solution in this case is to tell Apache not to keep the connection open. Modifying this in Apache – site-wide – is not recommended and could break more than it fixes so in this case we can do this for just the upload functionality of the single wordpress site.

Simply add the following code

<?php header ("Connection: close"); ?>

to the top of the

wp-admin/include/file.php

to make it look like this:

Job done, happy uploading!

WordPress: Unable To Create Directory Error

This article describes how to securely fix the wordpress “Unable To Create Directory Error”

This is a general permissions error and may be uncovered in a variety of situations; the most common of these is when trying to upload images:

“Unable to create directory /wp-content/uploads//. Is its parent directory writable by the server?”

There are many various articles about this error and horrifically, a lot of them advise fixes which are glaring security holes and can / will lead to compromise of the web server.

They look something like this: “Change permission of directories to 757 or 777” – doing this allows anyone on the internet to upload write files to your directory!!!

Here is the secure solution:

  1. Check to see which user & group the apache web server runs under. This information is held in the /etc/apache2/envvars file and you can view it as follows:

    Apache RUN Vars

  2. Create the directory in question if necessary – note: it may already exist:

    Create uploads Directory

  3. Change the group ownership of the directory to the group apache runs under – in this case  you can see that the group is “www-data”:

    Change group permissions

  4. Assign write permission to the group for that directory:

    Change Group Permissions

Job done!

WordPress: Dashboard Icons Not Displaying Correctly

This article describes how to fix the issue of the admin bar and dashboard icons not displaying correctly.

This can be down to may different things and will affect many sites, not just wordpress.

The first thing to do is to check the afflicted site in all of your browsers.

  1. Are you using Firefox?
  2. Does the site display correctly in Internet Explorer?
  3. Do you use the NoScript plugin?

If the answer to all the above is “yes” then read on – salvation is at hand!

In my attempts to stop Firefox gobbling up 25% and more of my CPU on a regular basis, I looked at blocking some unwanted things like flash etc. and I performed some tweaking of the NoScript Firefox plugin settings, specifically under the “embeddings” tab. In my quest to claw back my CPU cycles I applied the restrictions to whitelisted sites as well as the untrusted sites – in my mind it shouldn’t have been an issue but it certainly was!

 

Noscript Plugin Settings

Make sure that this box is unticked – this solved the problem in my case. Other resources dealing with firefox are listed here and may help you with your issue if the above does not; as with everything IT-related, your mileage may vary – good luck!

Websites look wrong or appear differently – Mozilla

Page displays as gibberish – Mozilla

Exit mobile version
%%footer%%