Monthly Archives: March 2012

Is my website down or do I just have a local DNS problem?

Great website to check status of your site in case you have problems loading it in your browser:

http://www.downforeveryoneorjustme.com

PHP Code for current year

The current year is useful in applications such as copyright notices, typically used in footer of website. This is the simplest possible code for displaying current year:

<?php echo date('Y'); ?>

An Unexpected HTTP Error occurred during the API request.

I recently configured a VPS with WHM and Cpanel installed. I created an account and installed wordpress on that account. However, when I tried to install new themes or plugins I ran into the following error message:

“An Unexpected HTTP Error occurred during the API request.”

I googled and searched and found lots of useless advice such as changing timeout limit in wordpress configuration or playing around with different transport modes in core files. Turns out the problem was all me and how I had configured the resolvers in WHM. I had cleared out the default ip addresses and entered my host’s internal nameservers. After changing resolvers to Google’s public DNS IP addresses in the whm backend it all started working properly.

Google’s Public DNS ip addresses:
8.8.8.8
8.8.4.4

Others ip addresses that can be used are the Open DNS ones:
208.67.222.222
208.67.220.220

The best thing would probably have been to leave the default values as they were (presumably provided by the IPS of my host). Lesson learned.