Sunday, June 26, 2011

Wordpress Timeout Problem

If you got this error message when you are using the wordpress API to access plugins and themes:

"An Unexpected HTTP Error occurred during the API request in wordpress"

You probably need to do 2 things to fix it:

1. Edit the wp-includes/class-http.php and find the line:


'timeout' => apply_filters( 'http_request_timeout', 5),

then, change to timeout value from 5 to some values like 30 or 60.

2. Increase the memory limit of your php setting to 64MB.

Wordpress NextGen Gallery Plugin


The wordpress plugin "NextGen Gallery" requires php 5.2 or above but my CentOS is running 5.1. So I need to update it with the following steps:
step 1:
Add PHP 5.3 repository
# rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm 

enable and install 
# yum --enablerepo=webtatic install php 

or update 
# yum --enablerepo=webtatic update php 

Congratulation, You/We have installed php5.3 

we can verify that it is installed or not by 
 [root@server tmp]# rpm -q php php-5.3.6-1.w5


** Remark
You may also want to install the GD library to allow WP resizes your images:
# yum --enablerepo=webtatic install php-gd