Archive

Posts Tagged ‘bug’

Fixing the “Unable to get webmail password” problem in Atmail

March 9th, 2011 3 comments

Plesk ships Atmail, but the default installation has a minor problem: when you open your webmail site, all you get is a message box saying “Unable to get webmail password!”. This is not caused by the user, who might have entered wrong credentials (in fact, he hasn’t even seen the webmail page yet, let alone entered his password). It’s caused by Atmail being unable to connect to its MySQL database.
The origin of this problem is in /var/www/atmail/libs/Atmail/Config.php, line 4:

fopen("/etc/psa-webmail/atmail/.atmail.shadow")

For some reason, the fopen() call fails, but there are several ways of fixing this. The easiest is to get the database password from .atmail.shadow and hard-code it in Config.php.

Disclaimer: don’t do this if you don’t know exactly what you are doing, why you are doing it and which possible consequences might result.

Now, change your /var/www/atmail/libs/Atmail/Config.php like this:

//if (!($fd = fopen("/etc/psa-webmail/atmail/.atmail.shadow", "r"))) {
//  echo "<script>alert('Unable to get webmail password!')</script>";
//  exit();
//}
//fscanf($fd, "%s", $buff);
//fclose($fd);
$buff = 'MySQL_password';

Note that you changed an Atmail application file, and it is very likely to be reverted by the next Plesk/Atmail update. This patch will be very helpful in that situation.

Tags: ,

How to repair the Apple iCal

August 30th, 2010 No comments

My iCal kept crashing constantly due to a segmentation fault (EXC_BAD_ACCESS, SIGSEGV). In the short time right before it crashed, I noticed that iCal tried to sync with a corrupt external calendar. The bad data got into iCal once, and iCal didn’t stand it :(
If you happen to meet a failing iCal one day, and you can’t remove the mischief from within iCal, you have two options:

  1. get the decent Purity app, unplug the network (so that iCal won’t sync before the culprit has been removed), and clean the iCal cache
  2. have a closer look at ~/Library/Calendars/, where all the calendars are stored. Inspect the info.plist files and .ics event data to find the bad calendar and move its folder to another location. Restart iCal. If it is still crashing you got the wrong calendar – put the moved calendar back and keep on searching.

No. 2 did the trick for me.
Plain text files and simple folder layouts might not look as evolved as SQL tables and mysterious binary data files – but they work just fine in this scenario and are pretty easy to debug.

Tags: , ,
Performance Optimization WordPress Plugins by W3 EDGE