Mostly about my amusement

Category: Software (page 12 of 22)

Cleaning up the WP database

WordPress blogs are based on MySQL and all the dynamic content is stored in a database. After trying out plugins, odd themes, and generally screwing around, my database has items in it that I can’t even recall what they were or if I need them.

One way to clean out the database is to export the blog to an XML file.  This will produce the posts, pages, and all the comments and not export the ton of junk in the database.  This way I create a clean empty blog, add the users, set up the theme and look I want and import the data.

This produces a very clean installation. It also removes me as the author for the comments I’ve left on my own blog. The table wp_comments table has a user_id field that the XML file does not have.

What I wanted to do is run a MySQL command that will find all instances in wp_comments which match my e-mail address, and update that record with my user_id on the blog. I could do this one at a time using phpMyAdmin but that’s pretty inefficient, not geeky, and time consuming.

After some research I found out to run these commands:

$ mysql -p
USE blogdatabase;
Database changed
SELECT * FROM wp_users WHERE user_email = 'notreally@myemail.com';

That gets me the ID number for my user.  Since it’s the first user created the ID is 2.

UPDATE wp_comments SET user_id = 2
WHERE comment_author_email = 'notreally@myemail.com';
Query OK, 113 rows affected (0.00 sec)
Rows matched: 113  Changed: 113  Warnings: 0

This updates the wp_comments table so comments left by me using my e-mail address.

Upgrade of VPS from Ubuntu 6.06 LTS to 8.04 LTS

My upgrade from Ubuntu 6.06 LTS = FAIL.

Last week I created a VPS on Slicehost.  I’ve been using Tektonic for a while now and have no complaints.  The support is very good and I can backup my VPS for when I need to.

I’m using Slicehost because I don’t want both of my domain DNS servers on the same provider. They offer Ubuntu 8.04 LTS, runs on top of Xen, and provide console access via an Ajax web front end.  You need to pay extra for a backup option. Aside from that one little point, using Slicehost is ridiculously easy and very manageable. They eat their own dog food and it shows.

On my Tektonic VPS it’s running on top of Virtuozzo.  No console just ssh but I do get to make a backup of my VPS and re-installing is a breeze. My only complaint is that it’s running Ubuntu 6.06 LTS which is a little dated.  For example the subversion client is 1.3.2 and I’d like to see more current versions such as 1.5.x.  On Ubuntu 8.04 LTS I just added the backports repository and I get current versions of packages.

Switching to Ubuntu 8.04 LTS should be simple. As root I ran these commands:

apt-get update
apt-get upgrade
apt-get install update-manager-core
do-release-upgrade

This is a seamless process and aside from asking me some questions, I had no issues.  The only issue I had is when I rebooted my VPS, it left the VPS un-bootable.  The support tech that I chatted with had not seen that before.  My VPS would not even start and I had to re-install it.

I’m now restoring the VPS to the backup I made yesterday, so it’s not all a total wash.  Most likely I’ll work with Tektonic to get 8.04 LTS on that slice provided they offer it.  Ubuntu 6.06 LTS is still supported so aside from consistency across servers, this is not a big deal for me.

Vista is consumer crap

So I booted my PC today when I got home today. I had intended to check e-mail before running out.

The damn thing won’t boot.  I’m typing this on the kitchen laptop.  It says the registry file is corrupted and I should boot off of my Vista DVD and select the repair option.  Except my PC has 4 GB of RAM in it, and the DVD I have won’t boot. That particular image will only boot with 2 GB of RAM or less.

Tomorrow I’ll pop out the RAM, pop in the old 2 GB that I have laying around and fix my PC.  How could Microsoft release such a unsupportable mess?  This is why I need to have a dual boot option and install Ubuntu Linux.  If I had an issue with Linux, I could fix it in no time at all.

Nuts.

Monolith purchased the F.E.A.R. name from Activision

Sometimes I don’t get just spam in my e-mail.  Monolith purchased the rights to the F.E.A.R. name from Activision.  Check out the sequel web site.

The first F.E.A.R. was meant to be played late at night and in the dark.  When I played it, it scared the crap out of me.  This real sequel is out in February 2009 and I’ll probably buy it the day it comes out for the PC.

“James Bond never had to put up with this Vista sh&^”

My Vista 64 bit OS has been acting a little flaky for a long time.  The latest symptom was my DHCP client not working.  When Dell did the free motherboard swap upgrade, I was supposed to re-install the OS then.  But I procrastinated and just waited till the pain got bad.

My XPS 700720 came with Windows XP Media Center Edition. When the upgrade came out, I purchased it from Best Buy.  I sent in the $19 and received the Vista 64 bit version DVD in the mail. For months I’ve been using the Vista 64 bit version.

My plan was to do the following:

  1. Using vlite I slipstreamed a copy of Vista SP1 onto my upgrade.  That was time consuming but worked.
  2. Backup all my data onto my WD Mybook.  I’m going to regret saying this but 1 TB is HUGE and my data fit with no problems.
  3. Wipe out my existing drive.  My registry was foobar so that was a good idea.  I did not want to upgrade from one mess to another.
  4. Clean install off the Upgrade DVD.  Worked last time, all you have to do is remember to not install the product key.
  5. Upgrade the clean install.  Redundant, but my version is an upgrade.  If I did not do this then my Vista would not activate.

That was the plan. Except the DVD would not install software, no way no how.

The bootable DVD HATED my 4 GB of high performance RAM.  I kept getting the BSOD before I could install anything.  Now Vista running has no problem with my RAM upgrade.  But the installer on the upgrade DVD refused to do anything except BSOD.  Lucky I kept the old slow speed 2 GB or RAM so I was able to get past that problem.

The upgraded DVD did not like my drives.  It’s not exactly a clean install that it does.  The target drive has to be formatted and a WINDOWS directory, or something in the WINDOWS directory, needs to exist.  If it’s not then the installer will refuse to copy files onto your disk.

I had to insert step 3.5 into my plan. I was able to get around this by booting off of my Windows XP install DVD that came with my PC and began to install the old version onto my system.  I did not have to complete the install.  Once files started to be copied I rebooted with my Vista SP1 upgrade.  Then I was able to proceed as planned.

The one piece of unexpected good news is that the fresh upgrade install activated online successfully.  I  was sure I’d have to do the 1-800-NOT-EXTORTION-EXACTLY call to Microsoft just to activate my software.

This is just crazy

Microsoft might be good with apps (debatable) but their OS’s always requires a rebuild after a period of time.  It’s just how it is since the registry just collects garbage from adding and removing hardware and software.

If my PC came with Vista then in theory I should have had an easier time of it.  Just pop in the vendor supplied rebuild DVD and off you go.  In the past that’s always what I did.  With this Vista upgrade, I should be able to install cleanly without the tricks.

The fact that I have to install an upgrade on top of a clean install that I just did is bizarre.   It shows that either the clean install was a mistake on their part or they put it in because they knew this scenario would exist.

They should include and support this for their upgrade too. A little online documentation would have been helpful.

Flickr Firefox 3 problem

Update: I re-installed Vista 64 cleanly (wiped out everything) and I am using the Nvidia video drivers from Microsoft. Flickr is still misbehaving on FireFox 3 for me.

On the upside, adding these lines to Adblock Plus’s whitelist did fix my problems with Facebook:

@@|http://*.facebook.com/
@@|http://*.fbcdn.net/

——————

On some of the installations I have, Firefox 3 and Flickr do not get along with each other. Here’s a screen shot of what’s happening.

Firefox 3 problem with Flickr

What happens is that when new content comes from Flickr’s website, the whole page does not get re-drawn. I drew a red box around the new page. Switching tabs forces the page to be redrawn but this is happening often.

This is not limited to Flickr. Facebook has problems where I click on something and nothing happens. This only occurs in Firefox 3, in Firefox 2 I never had any issue. The mozilla support forums are pretty looking but not really useful.

I hate to say it, but Flickr and Facebook are more reliable in Internet 7 than Firefox 3.

WordPress 2.6 (SVN copy not latest.tar.gz)

Well I ripped the band-aid off and did the upgrade. It feels like 2.5.5 or something, not as big a deal as 2.3 to 2.5 was.

I keep almost all of my files in wp-content so upgrading was not difficult.  I shut down my web server, renamed the old directory for the blog root, and used SVN to get a copy of 2.6 and moved the old contents to wp-content.

Once that was done, I started up the web server and ran the wp-admin/upgrade.php.  It was quick and painless. Everyone should backup their 2.5.1 installation (files and database) and do the upgrade once 2.6 is tar’ed up and placed on the web site.

Some changes:

  • The plugins management screen now lets you activate and deactivate selected plugins instead of doing them one at a time.
  • The Widgets in the design tab now work and move as you’d expect them. In 2.5.1 they would jump around when I moved them. I hardly ever play with them so that never bothered me.
  • Selecting a theme brings up a preview before you activate it.
  • Publishing via XMLRPC can now be turned off without killing trackbacks and pingbacks.
  • Atom feeds can be now turned off.
  • Post versions are now a feature.
  • Google Gears.
  • SSL admin works well! See Ryan’s post here. I’m using it now and it’s very seamless. It breaks Simple Tags suggested tags, but I’m sure that will be fixed eventually.

There are lots more changes of course; I’m just using it now.  So far it’s definitely worthwhile upgrade.

WordPress 2.6-RC1

Woo hoo, I see that WordPress 2.6-RC1 came with today’s SVN updates.

So far it looks and feels like 2.5.1 with some tweaks.  The Google Gears portion, better plug-in management, and now arranging widgets works.  When it is released as 2.6 I’ll upgrade this blog.

I’ll also get ready for the cries of support forum users who insist 2.5.1 get upgraded and maintained.

I give up on Slashdot

I use Google Reader to follow blogs and one of the RSS feeds I have is from Slashdot.  A few days ago they had a posting called Gmail, SPF, and Broken Email Forwarding? which was a topic I was interested in.

I use a Blackberry for e-mail and I gave up I using SPF for my domain.  It just could not work when legitimate e-mail came from another set of unknown servers. The work around is much more complicated than SPF.

So I went to that page looking to see if anyone had anything useful to contribute.

It was Slashdot at it’s finest.  The most useful comment was a comment about RFC 2606.

Please stop using mydomain.com and other such nonsense. Example.com is reserved by RFC 2606 [ietf.org] for use as a…wait for it…example domain name. Please make a habit of using it instead of whatever name strikes your fancy, as it is probably in use by real people.

Followed by

For God’s sake. It’s just text! RFC 2606 doesn’t specify what you’re allowed to write in a text message.

I didn’t need to read much more than that.  I stopped visiting Slashdot in my browser a long time ago, time to clean up my RSS feeds.