Archive for May, 2011

The other day, I encounetered a problem where Plesk would fail to save settings from the Web Hosting Settings page, giving only this error:

Error: Unable to update hosting preferences: hosting update is failed: webstatmng is failed –unset-config –domain-name=Domain name –stat-prog=

Rather uninformative, but it turned out to be fairly simple. The box had been upgraded from Plesk 7.5.4 to 9.5.4, and it seems something went wrong in the psa database:

# mysql -u admin -p`cat /etc/psa/.psa.shadow` psa -e "SELECT, h.webstat FROM hosting h, domains d WHERE dom_id=id AND name = '';"
| name        | webstat |
| |         | 
1 row in set (0.00 sec)

To remedy this, run the following MySQL query. Replace ‘none’ with ‘webalizer’ or ‘awstats’ where desired:

# mysql -u admin -p`cat /etc/psa/.psa.shadow` psa -e "UPDATE domains d, hosting h set h.webstat='none' WHERE AND''"

Or if you have more than one domain that has this problem, run the follwing to change all the empty webstat fields to ‘none’:

# mysql -u admin -p`cat /etc/psa/.psa.shadow` psa -e "UPDATE hosting SET webstat='none' WHERE webstat = '' "

Now, you can go back to Plesk’s Web Hosting Settings page and save your settings.

Microsoft’s Office 2011 for Mac leaves behind files in a number of places. When removing it, say to upgrade or downgrade or just re-install, it is good to remove all the left overs and start fresh. Here’s the quick and dirty of what to do.

Start by closing all MS Office components. If you’re reading my blog, you probably don’t need me to give you step-by-step instructions to do this through Finder. You can just copy the following into a terminal and be done with it. (Disclaimer: there may be mistakes):

sudo rm -rfv /Applications/Microsoft\ Office\ 2011
sudo rm -rfv /Library/LaunchDaemons/
sudo rm -rfv /Library/PrivilegedHelperTools/
sudo rm -rfv /Library/Preferences/*
sudo rm -rfv /Library/Application\ Support/Microsoft
sudo rm -rfv /Library/Receipts/Office2001_   #may not exist
sudo rm -rfv /Library/Fonts/Microsoft
sudo rm -rfv /private/var/db/receipts/*
rm -rfv ~/Library/Preferences/*
rm -rfv ~/Library/Preferences/Microsoft
rm -rfv ~/Library/Application\ Support/Microsoft
rm -rfv ~/Documents/Microsoft\ User\ Data

You’ll have to re-do the last four lines as each user, if you have multiple users on your Mac. Once you’re done, remove the icons from the Dock, and (because this is Microsoft after all) reboot!