After upgrading my box to centos5.3 I started seeing an error

There are unfinished transactions remaining. You might consider running yum-complete-transaction
first to finish them

On trying to run yum-complete-transaction the cmd was unrecognized.
. Solution: Install yum-utils, drop down to root environment (su -) and run the cmd yum-complete-transaction, it should run and fix your yum problem


Restoring wordpress from database

I messed up the permissions on my box and on restart three quarters of the services would not come up so doing a database backup was out. All my previous DB backups had the plugins still active. So when I tried to restore using them the blog is viewable, but when I try to log in I get a blank page on checking my Apache logs I saw the following error

Cannot use string offset as an array in wp-includes/capabilities.php on line 116

Restored database a couple of times nothing worked, tried upgrading & updating database nothing worked. Finally just installed WP from scratch with blank database. Opened up PhpMyadmin replaced new WP tables with tables from old WP DB backup, skipped table wp_options as it broke the new WP and both user tables as I had already setup the new user data on install, but I guess if you want to keep the old user data you can transfer these too.
Now I just made a backup of wp_options after restoring all the settings e.g blog name etc and turning off all plugins. This way next time all I have to do is just switch this table with the one from a backup whose plugins were still on at backup and am good to go.

Webcalendar send reminders error

After installing web calender and activating the send reminders option, be sure to edit the location of


as on default it tries


which is the wrong place. This will cause cron errors.
Remember to move it’s location for security purposes.

Date Edited Auto-Update

I was using dreamweaver to edit my webpages which uses it’s own auto update on save date code<!– #BeginDateformat:Am1 –>May 5, 2005<!– #EndDate –> (Dreamweaver’s Auto-Update-on-Save Date Code). When I switched to bluefish as my main editor the auto update code wouldn’t work. So I looked around and found a php code to get the same thing done. Just place it anywhere you want the date to appear

<?php echo date(‘F j, Y’, filemtime(__FILE__));?>

If you want to store it to a variable you can do

$variable_date = date(‘F j, Y’, filemtime(__FILE__));

You can exchange filemtime with filectime if you want to display the date the file was created.

Imap: Fatal: listen(993) failed: Address alr eady in use

Booted the server the other day and got the message that dovecot can’t start because listen address 993 was already in use.

Any logins to squirrelmail received an error message. To solve this I run the command

lsof -i :993

This will list the application listening on the particular port and you can go ahead and kill it or assign it a different port. Remember to change the port number (993) to whatever port your imap server or whatever program you are troubleshooting is supposed to be listening on.
To start dovecot the command is:

/etc/init.d/dovecot start

copy files with smbclient

I am used to using the linux gui to do most of my stuff, but every now and then you have to drop to cmd line to expediate some tasks. I found this neat app that i haven’t been using called smbclient, it has been saving me a lot of time while copying files to and from my linux box since I started using it.

To log in to a share:

smbclient //IP/share  -> you enter password and you are in

To copy local file to share:

put test.odf  -> you can add path details if the file is not in your local directory e.g /var/doc/test.odf

To copy file from share:

get test.odf

To find out further uses of this app checkout this link.

Secure squirrelmail with ssl

To secure squirrelmail, edit the following file and edit it to look like below.

vi /etc/httpd/conf.d/squirrelmail.conf

Alias /webmail /usr/share/squirrelmail

<Directory “/usr/share/squirrelmail”>
Options Indexes MultiViews
AllowOverride None
Order deny,allow
Deny from all
Allow from all

Thats it.

NB: Remember now the only way to access mail is by https://……../webmail not http://……/webmail otherwise you get a nice page saying Forbidden!

Network pdf print er

I love the world of open source where would i be without them. Am always thinking on how to cut down the use of paper so i got the idea to go digital and just make paper copies only when they are needed. I tried a couple of apps starting with adobe acrobat Pro, but it didn’t make sense to me why I have to install a 200Mb program just to help me create pdf’s, I tried a couple of freeware pdf printers ad most of them had one limitation or another, or they would be branding your digital documents with there ads. Finally I got a solution from the Linux world I installed cups-pdf by adding the epel repo to my machine and instantly I had a network pdf printer all the machines in the network can print to this pdf printer and it’s free no ads on my digital docs, i can configure it to my needs and it’s barely a few Mb’s. Bottom line there is no equal to it in the windows world at the cost and performance.