A client got an email this morning with the following content from the Plesk cron daemon :

/usr/local/psa/libexec/modules/watchdog/cp/send-report weekly
PHP Fatal error: Class 'OptionalServices_ServicesConfiguration' not found
in /usr/local/psa/admin/plib/common_func.php3 on line 2948

Apparently, Plesk already released a fix for this and the fix can be seen at http://kb.parallels.com/en/9329. The thing is, the attachment is double-zipped so here's how you'd apply the fix :

gunzip send-report.gz
mv send-report send-report.gz
gunzip send-report.gz
cp /usr/local/psa/libexec/modules/watchdog/cp/send-report /usr/local/psa/libexec/modules/watchdog/cp/send-report.backup
mv send-report /usr/local/psa/libexec/modules/watchdog/cp/send-report
chmod 754 /usr/local/psa/libexec/modules/watchdog/cp/send-report

Good luck :)

Find broken symlinks

Posted: 24th November 2010 by Valkyrka in bash, shell

Often times you may find that your directories contain broken symlinks ( symlinks from folders which have been deleted ). In order to find broken symlinks, the following should help :

find -L /home/user/public_html -type l

Sort files in current directory by modification time

Posted: 30th May 2010 by Valkyrka in bash

This is how you can list all the files in the current directory, sorting them by modification time :

find . -type f | xargs ls -ltrhg