Problem solved: WordPress install generates a blank screen

2009/04/05 22:24:00
Print Friendly

I smacked my head on this one, seeing as one of my previous posts had the same solution.

CentOS 5 does not install php-mysql by default. When the WordPress installation runs, it disables error reporting for certain functions, presumably so that they can be dealt with later.

Unfortunately, this error reporting doesn’t get dealt with correctly, and instead the end user is presented with a blank page instead of a message telling them that the mysql functions don’t exist.

I’ve got a patch ready for the WordPress folks, but I’m still waiting for my login to their bug reporting system so I can submit it.

I hope this helps someone else.

In short, if you see a blank screen after putting in your database information during install, make sure that the php-mysql package is installed on CentOS. I spent hours trying to figure out why this wasn’t working right.

Thoughts on Blogger

2009/04/02 08:39:00
Print Friendly

Well, it looks like the slow connections I’ve been experiencing with Blogger may be enough to push me back onto my own server. B2Evolution was good to me when I ran it, so I’ll use that software for blog entries. The photos I’ll probably keep on Picasa, but I haven’t given them much thought.

I’ve come to the conclusion that I want to run my own server for web hosting. It is in the small challenge of doing so that I find some joy. Funny to think that the systems administration that I do could be considered a “hobby”?

There are other things I want to do with the server as well, like limited file sharing, that I have a hard time doing with Google Docs.

So, thanks to a tip from a friend, I’m looking at ServerADay for a discount server that will meet my hosting needs. I’m waiting for one in the $20 range if I can get it. This is a far cry from the almost $100 prices at Serverbeach or the $79 servers at Layered Tech.

Once I get a server, the next issue will be moving the blog over to whatever software I end up using. I’m planning on keeping my Calendar and Email on Google Apps for now, as, with slight annoyances, they’ve been serving me well.

I’m thinking that moving to Blogger was a good experiment, but it did not garner the benefits I had hoped for.

Optimizing Netbook Windows XP Performance

2009/03/19 15:39:00
Print Friendly

Recently my fiancee gave me an HP mini 1030NR netbook for my birthday. Though its a great portable personal device, it does not really have the performance I’ve come to enjoy from my other computers. This is really not the netbook’s fault as its focus is portability, not performance.

So, I set about the task of optimizing the performance of the netbook.

The netbook really doesn’t come with much software, so this article deals with Windows XP. The items discussed here are in addition to the normal maintenace one would do for Windows (e.g. defragmenting your hard drive). This article also doesn’t cover the concepts of “disabling unneeded services” or “disabling unneeded startup items”, as those differ from user to user.

For normal Windows XP maintenace, check out Microsoft’s web site at
http://www.microsoft.com/windowsxp/using/setup/maintain/improveperf.mspx

Removing the screen fluff

Go into Control Panel -> System
Click on the Advanced Tab
In the Performance Area, click the “Settings” Button
Click on the “Visual Affects” Tab
Choose the “Adjust for best performance” radio buton

In addition to other things, this will alter the display of your desktop to something analogous to the windows widgets used in Windows 2000 and prior, which doesn’t look as sleek, but that sleekness requires additional processing power and memory that you may not have in reserve.

Make your desktop background any single color you want

Photos (in JPG or JPEG format) in the background require more memory in order to display them. Go with a simple single color. It’s easier on Windows.

Fix the filesystem so that its not performing unnecessary tasks

For backwards compatibility with DOS, Windows XP creates an additional entry in the file listing in the MS-DOS “8.3” format. This heralds back to the days when filenames could only consist of 8 characters with a 3 character extension. The last time this was really used was Windows 98. My netbook really doesn’t need to maintain this, so I opened up a command prompt and typed the following:

fsutil behavior set disable8dot3 1

Then rebooted to reload the NTFS driver without this setting.

Thanks O’Reilly:
http://www.windowsdevcenter.com/pub/a/windows/2005/02/08/NTFS_Hacks.html

Indexing: Save yourself time now or later

Windows XP can index your files so that searches take less time. I’m using my netbook with Google Apps, so some my files are in the cloud. I also store what files I have locally in folders under My Documents. I don’t anticipate needing to search the hard drive, so I turn the Indexing service off.

Go to Control Panel -> Administrative Tools -> Services and double click the Indexing Service. If it is running, stop it. If its Startup Type is set to Enabled or Manual, change it to Disabled so that applications will not launch it on you.

Other improvements to Windows XP

As noted before, removing uncessary startup programs and services will improve your performance more than these simple steps, but with the above you should experience a noticeable improvement in your netbook desktop experience.

Lil’ bit: Redirecting traffic out a given interface

2009/02/25 16:23:00
Print Friendly

This is a relatively simple trick, but one that I thought was rather clever.

I needed to SSH into a target server (172.16.4.1) that only allowed connections from a specific IP address (172.16.4.10). I knew that the system holding that specific IP address was down, yet I still needed to SSH into the target.

To further complicate matters, I did not have physical access to the target network at the time. But, I did have remote access (and root) to another Linux box on the network.

Hmmm…

So, all I needed to do was change the IP address of my one good box to the one expected by the target system, but if I changed the IP address on the main interface, then I would disconnect myself.

Enter virtual interfaces and routing.

I created a new virtual interface with ifconfig (assuming 172.16.4.10 is the IP we want to come from):

/sbin/ifconfig eth0:1 172.16.4.10

This does not, however, mean that my SSH connection will come from this address, so I needed to change the routing table (assuming 172.16.4.1 is what we want to connect to):

/sbin/route add -host 172.16.4.1 eth0:1

Now, I will effectively be coming from my new interface when I connect to the target server.

Automatically Backing up Blogger

2009/02/14 00:26:00
Print Friendly

In my continuing quest to use Google Apps as best I can, I’ve been reading up on the Google Blogger API.

I thought that automatically backing up a blog on Blogger would be easy, but it turned out to be a more complex script that I had originally thought.

Authentication was the part that I was missing. Using curl, I can acquire the authentication information like so:

curl https://www.google.com/accounts/ClientLogin -s -d Email=smj@littleprojects.org -d Passwd=mypassword -d accountType=GOOGLE -d source=blog-backup -d service=blogger

From this line, you get output like so:

012345678902234567890323456789042345678905234567890623456789072345678908234567890
SID=DQAAAHYBADCv2pSv7nflacDNwz3zEDUGtrSvNVDcpkSfddi77b3U5sEaHmP8YLWhmA36F9rk85mL
8J5dqo4apn0T1vKz0fPGI9Xtnuet6cuE2ZzYvrNIwbSC_HjTqF4zudNQnnlDuD2wqZT-g1qXI8KhGAQZV4NexHZoQPlabTsGuRZeIBxj1ALSID=EUBBBIaBADCl-kNxvRVmcQghpt3cqSMfEooKR9flLOUZqwgP9OrZS83gse-KSdTNeXhxsET7FYenDhceP9lIPOmesH-t9qh-AWUHjjMdZEbUNeF9mWyzln6Z-FajaiG-cVFkqW0ZJ8ZbnCP30xXj6xFK6QxaAcqy_9Pej8jhEnxS9E61ftQGPgAuth=EUBBIacAAADK-kNxvRVmcQghpt3cqSMfEooLNMflLNIQqwgP9OrZS83gs-KSdTNeXhxsET7FYePWmaD8Vsy1V4LSUGMUP48Je2TO8OcjBj6HgAtPhiZeX-gKDfagZDK44j4n-Tkb44nhOnp2_QPSnBj3Z2vYwOEDjjG3Q53aQVC2132JKOuGh

The line we’re interested in is the one starting with “Auth=”. This is what we will use to authenticate to blogger so that we can grab our blog backup.

Part two consists of downloading the XML backup of all of your posts.

I knew that I could go to the following URL to get a backup of my blog posts:
http://www.blogger.com/feeds/blogid/archive

where I fill in blogid with the blogID supplied by your URL on Blogger. For example, as I type this, the URL in the address bar is

http://www.blogger.com/post-create.g?blogID=6964696676319111700&postID=8574983142196621787

which tells me that my blogID is 6964696676319111700.

So, to download the blog backup, I use the following URL:
http://www.blogger.com/feeds/6964696676319111700/archive

With the use of the tool curl and some Bourne Shell scripting, the following script can be used to automatically download my XML file containing a backup of my blog from Blogger.

#!/bin/sh
 
# Authentication and authorization
export Auth=`curl https://www.google.com/accounts/ClientLogin -s -d Email=smj@littleprojects.org -d Passwd=mypassword -d accountType=GOOGLE -d source=blog-backup -d service=blogger | grep "Auth="`
 
# Get the xml file and store it into blog-backup.xml
curl -H "Authorization: GoogleLogin ${Auth}" "http://www.blogger.com/feeds/6964696676319111700/archive" &gt; blog-backup.xml<span style="font-size: 85%;">

Now I set cron to run this script once a week and I will have a backup of my blog entries should something horrible befall blogger; or I choose another blogging service.

References: