Monthly Archive for June, 2009

WordPress Upgrade Problems

I decided to upgrade WordPress to version 2.8 using the Automatic Upgrade Tool. The upgrade looked something like this:

Downloading update from http://wordpress.org/wordpress-2.8.zip
Unpacking the core update
Verifying the unpacked files
Installing the latest version
Warning: copy(/home/www/blog/wp-content/themes/default/index.php) [function.copy]: failed to open stream: Permission denied in /home/www/blog/wp-admin/includes/class-wp-filesystem-direct.php on line 122
Warning: copy(/home/www/blog/wp-content/themes/default/index.php) [function.copy]: failed to open stream: Permission denied in /home/www/blog/wp-admin/includes/class-wp-filesystem-direct.php on line 122

After that, my blog wouldn’t load at all, and when I looked on my server, the entire blog directory was empty. I recognized the two listed files as ones I had changed in this post about displaying the author. It turns out that I had inadvertently set the owner of the file to root which gave the WordPress upgrade no permission to upgrade the file. Instead of failing gracefully, it simply dumped the entire blog directory.

It appears this bug has been addressed in this ticket. Hopefully a similar error won’t cause me any problems during my next upgrade.

Edit: It turns out the damage was a bit greater than I initially realized. This bug deleted almost every file that was owned by the Apache user. This included two wikis that I run and several other miscellaneous sites. Luckily I was able to restore everything from backups. I have also changed the ownership of many of the files to something other than the Apache user.

BlackBerry Bold Firmware Upgrade

I upgraded the firmware on my BlackBerry Bold 9000 from the default 4.6.0.167 to the 4.6.0.266 version using the instructions available on the CrackBerry.com forums. I went ahead and followed the directions, and the flash went successfully. The majority of my settings were restored. I had to enter user names and passwords for the YouMail client and the Google Apps sync client. However, the Pandora client retained its credentials correctly.

I had decided to upgrade my firmware because I had begun experiencing a lot of dropped calls and data connectivity issues. I often had to browse to a website or turn the radio off and on to start receiving email again. My Bold caused my speakers to hum constantly as it toggled between 3G and EDGE networks. After the firmware upgrade, the data connectivity issues and the speaker hum have gone away, but the phone still drops calls more often than it should. Many people had reported a battery life improvement relative to the 167 firmware. I didn’t notice this initially; however, when I updated the YouMail client on my BlackBerry, I discovered a new option to disable polling for new voice mails. Once I disabled that, my battery life improved substantially. After the update, I was also able to connect to Marquette University’s wireless network from my phone. It’s possible I had done something wrong in the past; however, I suspect the version fixed some little bug that made it incompatible with the wireless network on campus.

Despite AT&T’s delay in releasing updates for the Bold, I recommend this update if you are experiencing any problems with the current version of the firmware.

Edit: After using the new firmware for a while, I noticed the annoyance of the Visual Voice Mail icon in the application switcher. Since I cannot quit the application, I decided to find a way to remove it. A forum post on PinStack.com has the solution:

Another option is to simply remove all the vvm cod files from the java folder (7 of them) and then start up dm or apploader and run the through the process. It should tell you that it doesn’t recognize those files and remove them.

java folder is located: C:\Program Files\Common Files\Research In Motion\Shared\Loader Files\9000-v4.6.0.247_P4.0.0.206

Of course the version number is different, but once I removed the files and ran the loader again, the icon disappeared.

Show the Author in WordPress

I had added the code to the default WordPress theme a while back, but when I upgraded, it apparently cleared it out. This time I documented the changes I made to the default theme. Changes must be made to two files in “wp-content/themes/default” which is the default theme directory.

The first file is “index.php” and only requires the removal of the comments around “the_author()” portion.

<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>

The second file is “single.php” and requires the addition of a “the_author()” block similar to the following.

on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?> by <?php the_author() ?>

I achieved these changes with the following sed commands.

cd wp-content/themes/default
mv index.php index.php.default
sed 's/<!-- by <?php the_author() ?> -->/by <?php the_author() ?>/' index.php.default > index.php
mv single.php single.php.default
sed "s/on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>/on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?> by <?php the_author() ?>/" single.php.default > single.php

The better solution is probably to find a theme that does this by default instead of enabling it every time the theme gets updated; however, I haven’t gone looking for a replacement theme yet.

This has been tested with WordPress 2.7.1.

Edit: It is advisable to then set the permissions on those two files back to that of the Apache user:

chown www-data:www-data index.php single.php

This will help prevent possible problems during an upgrade.