Tech stuff's blog

Administration page not loading on Drupal

After not touching a couple of Drupal sites for a while I wanted to check what modules needed to be updated. It was at this point that any attempt to get into the administration section produced a blank screen. After looking at the error_log file in the Drupal root directory on the server it indicated that PHP was unable to allocate memory. A Google showed the quickest solution was to add ini_set('memory_limit', '24M'); to the /sites/default/setting.php file. This got the sites working again but it does leaves the question of how soon before that limit is also reached.

Drupal and searching

I ran into a problem this week where the Drupal cron job wasn't running to completion. The cause of this appeared to be in the search module - disable it and cron ran; turn it back on and cron failed. Since people probably do want to search for stuff on the site this meant digging into the Drupal 6.1.5 source.

The first port of call was the search_cron() routine in search.module. Adding an echo statement at the start and end showed that only the former was being displayed. This implied that somewhere further down the chain was causing the process to exit. I then added an echo statement to show which hook_update_index routine was causing the problem. It turned out to be the one in node.module. From there it was a case of finding the node id with the issue. Running domainname/?=node/nodeid for one of the IDs showed a blank page where a picture node was expected to be. I tried removing this node in the Administer content section but it refused to go away.

This meant removing that record from the node and node_revisions table using phpMyAdmin. The cron job then ran perfectly with the re-enabled search module.

I have no idea how the problem node became corrupted. I'm a little worried how it terminated the generation of the search index with no obvious warning (and I couldn't see anything in error_log) but I'm now aware of the impact bad nodes can have.

The Go-Slow G5

I have an iMac G5 bought back in the day. It currently sits in my living room and is used mainly for the basics of email, RSS newsreader, newsgroups (yes, they still exist), browsing and remote speakers (using Airfoil). I used to use it for iTunes and iPhoto but moved them to the more powerful office machine when they started to become very frustrating to use as they became glacially slow. Despite removing them the G5 kept getting slower while the fans kept getting louder. Recently the dreaded random sleep appeared.

The first release of the G5 was not Apple's finest hour in manufacturing quality. The capacitor issue affected many makers and mine ended up with a new motherboard thanks to that. The people doing the work then managed to break the DVD drive (requiring yet another replacement) but let's not dwell on their stupidity. Earlier this week I was reading email and the machine went to sleep. Moving the mouse caused it to wake up. A minute later it went to sleep again. I checked to ensure that I didn't have any sleep corners defined in System Preferences (it went to sleep while I was doing so). A quick Google (involving three machine sleeps) indicated it was either a power supply issue but one suggested it might be related to ventilation.

I unplugged the machine, laid a towel on the bench and placed the G5 face-down on it. There are three captured screws at the bottom which allows the entire back to be removed as soon as they are unlocked. There was a small bit of dust spread around but the noticeable item was the huge furball of lint that sat near the bottom. On the G5 there is a small air vent just below where the power cord plugs in that is where a lot of the air required for cooling comes in. The mass of lint was blocking the space between the vent and the motherboard. Removing that and giving the rest a quick going over with the vacuum provided a working machine again. Using the iStat widget I can see that fans are running thousands of RPM below their previous levels and the internal temperatures are 15-20 degrees lower. The machine is responsive and usable once again.

As someone who writes software for a living this merely supports my belief that the only computer problems are hardware ones.

Dumb things to do with OS X and VMware Fusion

For the last twenty months I’ve used Parallels as a means of developing Windows software on my Mac. Having tired of the kernel panics it generated at least once a month I’ve been using a trial version of Fusion. I’ve found it not only runs quicker but has yet to generate a kernel panic. I'll definitely be buying it at the end of the trial period.

The only problem I’ve had is a "failed to connect to peer process" message which appeared the other night. A quick Google showed that a reinstall was the best option but that failed to work. Taking the hardcore approach I deleted the /Library/Application Support/VMware Fusion directory and found that the reinstall worked.

The problem appeared to arise because I decided to change the security settings on the /Library folder and all enclosed items to give my login account read and write access. This was so I could set folder colours to determine which ones were backed up by ChronoSync (yeah, I know, it was late and it seemed a good idea at the time). Since this changed some ACL values that was enough for Fusion to generate the above error.

The moral of this story is to leave the /Library folder alone as it not only causes the permissions check in Disk Utility to take hours but can stuff up your Fusion install.

Syndicate content