Crontab Log – How to log the Output of a Cron Script (and email it as well)

cron-logo-680x225 As mentioned earlier, in my world of development, I keep landing myself into sticky situations and what makes me keep my job or clients happy is that I get myself out of such sticky situations quick quickly. Now, the situation I encountered recently involved crons

I have a php script whose function is to check a certain database for messages to be sent. The script should then collect required messages and pass them on the the Goip SMS gateway. Now, how do I save the output of the sending to the gateway so that I can know which ones failed – if any – without having to add the logging function into the sending script and without having to look through cron’s own logs? Answer – simply tweak the cron command slightly to achieve logging.

Continue reading

Share

CLI Certificate Tools for Zimbra Server How To

Zimbra_Logo

For the few of you who actually run your own organizational mail servers and the even fewer of those who run Zimbra, here is what you do when you encounter the following error while trying to start zimbra

Host mail.domain.tld
Unable to determine enabled services from ldap.
Unable to determine enabled services. Cache is out of date or doesn’t exist.

This is normally caused by the expiry of the certificate that Zimbra uses for ldap. All you have to do to fix the situation is generate a new valid certificate, using Zimbra’s CLI (command line interface) certificate tools.

Continue reading

Share

Import CSV to MySQL using PHP

In my course of work, I normally come across many small problems that I am asked to solve and here is one of the simpler ones. The following code is for developers looking for an easy way to import a comma separated values (CSV) file into a mysql database via PHP. The code below adds contacts from an uploaded CSV file into a MySQL table, populating three fields (name, email, phone) Continue reading

Share

Talking of New Technologies

And I am now officially on the Windows 8 wagon. I have come to the conclusion that for mobile computing, Windows or Mac is the best way to go if you want to avoid any hassles. I still however, believe in having a Linux or Unix box for my core services – that is what my home PC that delivers supporting services to the other computers in the house run.

Continue reading

Share

New look, New Technologies

For first time visitors to the site, welcome – I hope you find the blog useful. For returning visitor, well, as you may have noticed (or not) – the look and feel of the site has changed – somewhat. That is coz I have just implemented a template that incorporates Twitter’s bootstrap (thus it is responsive – you welcome mobile users) and a Metro look and feel (maybe not all the way – but somewhat).

I find it refreshing to make changes every so often and a template change at least once every 24 months is not so bad – and I made this current change mainly so that I could incorporate a responsive template to the system with the help of Bootstrap.

Continue reading

Share