Saturday 6 August 2011

Solved - Download failed.: Could not create Temporary file

Solved - Download failed.: Could not create Temporary file


Ok, trying to do an automatic upgrade from 2.7 to 2.7.1 and after logging in it says:

"Downloading update from http://wordpress.org/wordpress-*.*.*.zip

Download failed.: Could not create Temporary file

Installation Failed"


Solution:

1>

if you have my own dedicated server with just one site. It can get tiresome changing folders permissions from 755 to 777. After doing some research I noticed that Apache is running with php safe mode "On"

Once i changed it to Off i was able to install/update plugins with the wp-content folder having a 755 permission.

I know that having Safe mode off is a security issue but being that i have my own server and only me as the only user i don't have a problem with it.


2> ISP won't allow it. Is there a way to designate a temp directory where additional permissions may be granted to facilitate this process?

I found two fixes which involve adding a line to the wp-config.php file. I added both and the plugins update fine now. I need to try it on one of my installations to see if WordPress itself will auto update. Here are the lines to be added to the config file:

define('WP_TEMP_DIR', ini_get('upload_tmp_dir'));
putenv('TMPDIR=' . ini_get('upload_tmp_dir'));

It should not be this difficult to figure out WordPress. Please add a variable that we can fill in the settings. Then we know which directory needs the additional permission.


Thanks, Arun

0 comments: