Fix Failed WP Plugin Installation In Safe Mode

When using the new auto plugin installer in WordPress it failed miserably with the following error message:

Downloading install package from http://downloads.wordpress.org/plugin/addthis.1.6.6.zip…

Warning: touch() [function.touch]: SAFE MODE Restriction in effect. The script whose uid is 587 is not allowed to access /tmp owned by uid 0 in /long-path/wp-admin/includes/file.php on line 199

Download failed. Could not create Temporary file.

What to Do?

After some searching I found a simple solution: Just create a new temporary folder in your web root (often called public_html) folder and point WordPress to this new folder.

How Do I Change the /tmp Folder Then?

That’s Easy!

Just add the following line to your wp-config.php

define('WP_TEMP_DIR','/your_path/public_html/tmp');

And make sure to use the name of the folder where WordPress is installed or the root html folder. And also make sure you have created the tmp folder and chmod it to 777 before adding the define to wp-config.php

This is all there is to do, enjoy!

The WordPress 3.0 Upgrade Was a Success

Finally after a couple of hours of work all four of my blogs have been upgraded to WordPress 3.0 and if feels good!

Here’s what you need to watch out for when upgrading:

Automatic Upgrade Glitches

The automatic upgrade feature of WordPress does not work if your web host is running PHP in safe mode, you’ll get this error:

Warning: touch() [function.touch]: SAFE MODE Restriction in effect. The script whose uid is 587 is not allowed to access /tmp owned by uid 0 in /home/sbyholm/domains/simonbyholm.com/public_html/wp-admin/includes/file.php  on line 184

Download failed.: Could not create Temporary file

Installation Failed

This issue is easily solved though. The problem is that WordPress can’t write to the /tmp folder because of the safe mode restrictions. The solution is to make a new /tmp folder inside you wp folder and make that writable.

  • Create a new folder /tmp inside you current blog folder
  • Chmod the folder to 777 using either your control panel or FTP
  • Add a line to wp-config.php telling wordpress where the new /tmp is located
define('WP_TEMP_DIR','/full/path/to/tmp');

After doing this you can run the automatic upgrade inside the WordPress dashboard of your blog

Plugins Not Working

On one of my blogs I had several SEO and other plugins running and this brought some problems when upgrading.

After upgrading WordPress from 2.2.2 to 3.0 and upgrading all plugins using the automatic update after upgrading wordpress… some of the plugins was showing up as both the old version (which was running) and the new version which was disabled.

I had to manually click deactivate, delete on the old plugin versions and then activate the new versions.

Another thing with the plugins was that many of the wasn’t visible after the upgrade but required that I go into the admin panel and drag some widgets onto the blog to see them again.

Theme Troubles

I just had to forget about using the old default theme, it threw errors in the single post view. I switched to the new Twenty Ten which is really nice looking but where I’ll have to adjust the margins to some of the images in my posts. The margins in Twenty Ten is just too narrow.

Strangely the homemade themes I have hacked from the old default theme continue to work with WordPress 3.0 and still looks as ugly as ever 😉

Why You Should Upgrade to WordPress 3.0

I like the look and feel of WordPress 3.0 and it’s probably a good idea to upgrade your blogs as soon as possible. Especially if you use the old default theme the new Twenty Ten is a lot more inviting and readable.

Just remember to backup your database and your site before the upgrade!

And if you didn’t notice this blog is now running WordPress 3.0, I think you have to look at the dashboard to see the difference the theme looks the same to me.

Before I Upgrade to WordPress 3.0

This is me moments before I’m converting this blog to WP 3.0… let’s hope I don’t destroy anything, let’s hope the backups are ok and lets hope my Woo theme still works with after the move to WP3.

I have already moved two older blogs to the new platform, old WP installs with no auto-update function. The first one went fine and even my own super hacked and ugly theme still works and is exactly as ugly after the upgrade as before.

The second upgrade was also on an old 2.2.2 install but this time I had to face some challenges. Install went find but upgrading the plugins gave this error:

Warning: touch() [function.touch]: SAFE MODE Restriction in 
effect. The script whose uid is  is not allowed to access /tmp 
owned by uid 0 in /path_to_wordpress/wp-admin/includes/file.php 
on line 198
 
Download failed. Could not create temporary file.

With no plugins upgraded… now what?

Easy: The _khAttAm_ blog already solved the problem for me, I just skipped the owner part, made a chmod 777 /tmp folder inside the wp folder, updated wp-config.php according to the instructions and that’s it.

Ok now with plugins updated I noticed that some of the plugins had both an old version, that was activated, and a new version that was inactive. I had to manually delete the old versions for 3 plugins and activate the new one… strange.

Next issue (how many are there) is that the old default wordpress theme throws an error with WordPress 3.0.  In single post view, the post is followed by this error:

Fatal error: Call to undefined function the_terms2posts() in /home/sbyholm/domains/milesgallon.com/public_html/blog/wp-content/themes/default/single.php on line 19

I think it might be a plugin for related posts that doesn’t support 3.0… maybe… I’ll use the new Twenty Ten Theme instead… but that one does not support all the plugins I have installed… bad….

Anyway Twenty Ten has a clean and nice look and I’ll stick with that, have to check for new plugins that support 3.0

Now I’ll just have to check that the Woo Themes support 3.0 before updating this blog, I’ll make a new post on the other side.

Having Problems with Ping-O-Matic and Firefox?

I just started using Ping-O-Matic, a service for broadcasting your ping to multiple other ping services at the push of a button.

The problem is there’s something wrong with Pingomatic.com and Firefox (and IE in some instances). I can successfully submit the first feed, but when submitting the next feed the form breaks and I can only see the first input box for the Blog name.

Not nice…

I found a post at Jaypee Online discussing the Ping O Matic problems at length. The solution they provided, to clear the cookies for Ping-O-Matic, I didn’t like that too much, it’s a hassle clearing the cookies for a specific site only. And I don’t want to clear all cookies having to fill in my details at a million sites again.

My solution:  As I normally use Firefox for my surfing, I now use Internet Explorer for Ping-O-Matic. And even though the version of Internet Explorer I use have the exact same problem, I can now clear ALL cookies. As I don’t use IE for anything else it’s not a problem that the other cookies are wiped as collateral damage.

So when I need to submit a feed, I open IE, hit Tools->Internet Options and Delete… I then hit Delete again and I’m done. I can now go to Ping-O-Matic and submit my next feed.

Back in Firefox my cookies are not changed as I did the delete in Internet Explorer.

TIP: If your version of Internet Explorer does not experience this problem or if you have another browser, like Chrome, you can use that browser for your Ping-O-Matic submissions and use Firefox for everything else.