Horde: there are no parts that can be displayed inline.

June 26, 2011    |   Posted by admin   |    Category: cPanel Management, Plesk Management

While accessing an email using Horde, you may notice that Horde isn’t displaying the contents of the email rather it displays the following message

there are no parts that can be displayed inline.

The reason for “no parts can be displayed inline” error is the “inline” setting of the Horde HTML driver is set as false.  To enable the setting, edit the mime_drivers.php file and set the “imp/html/inline” attribute to true.

On a cPanel server, the file is located at /usr/local/cpanel/base/horde/imp/config/mime_drivers.php and the attribute is:

$mime_drivers['imp']['html'] = array(  'inline' => false;

On a Plesk server, the file is located at /etc/psa-horde/imp/mime_drivers.php and the attribute is:

$mime_drivers['imp']['html']['inline'] = false;

Set the value as ‘true’ and save the file. Horde will display the contents properly again.

Comments Off on Horde: there are no parts that can be displayed inline.

Exim: 451-The server reached its limit for processing requests from your host

June 13, 2011    |   Posted by admin   |    Category: cPanel Management

Recently I had a problem while sending emails to a specific server and while looking at the logs I saw the following:

451-The server has reached its limit for processing requests 
from your host. \n451 Please try again later. 
T=remote_smtp defer (-53): retry time not reached for any host

The reason could either be the, exim rate limiting the number of emails OR the exim databases are corrupted.

In such a case, you have 2 options

1) Increase the number of emails each domain can send per hour from
WHM >> Tweak Settings >> Max hourly emails.

2) If increasing the email limit does not help, surely the exim database is corrupted. The fix is to use the exim database tool called “exim_tidydb“.

SSH to your server and execute:

# /usr/sbin/exim_tidydb -t 1d /var/spool/exim retry > /dev/null 
# /usr/sbin/exim_tidydb -t 1d /var/spool/exim reject > /dev/null 
# /usr/sbin/exim_tidydb -t 1d /var/spool/exim wait-remote_smtp>/dev/null

Once done, reinstall courier and exim using the cPanel scripts.

# /scripts/courierup -- force 
# /scripts/eximup --force

You should now be able to send emails from the server.

Comments Off on Exim: 451-The server reached its limit for processing requests from your host

How to install PHP-Json module on a Linux Plesk server?

May 20, 2011    |   Posted by admin   |    Category: Installations, Plesk Management

To install/enable Json support for PHP on a Linux Plesk server, follow the below steps:

1. Install php-pear and gcc

# yum install php-pear gcc

2. Install json module

# pecl install json

3. Now, the json.so file is created under the php lib directory i.e. /usr/lib64/php/modules/ and needs to be called in the json.ini so PHP configuration could read it.

# cd /etc/php.d 
# echo "extension=json.so" >> json.ini

4. Once done, restart the httpd service

# /etc/init.d/httpd restart

This is it.

However, the other way is to manually install the php-json module. Follow the below steps:

1. Download the json package

# wget http://pecl.php.net/get/json-1.2.0.tgz

2. Untar and goto the newly created directory

# tar -zxf json-1.2.0.tgz 
# cd json-1.2.0

3. Create the configuration files and configure json

# phpize 
# ./configure

4. Create the installation file and install it

# make 
# make install

Once done, json.so will be created in /usr/lib64/php/modules/ directory and needs to be called by the php configuration directory

# cd /etc/php.d 
# echo “extension=json.so” >> json.ini

Restart the httpd service and check the php-json module by executing

# php -m | grep json

Note:  The manual installation method can be used on a plain Linux server as well, just the extension need to be added in the php.ini file directly.

Comments Off on How to install PHP-Json module on a Linux Plesk server?

Plesk StatInfo-> getProductVersion failed: file_get_contents () failed

May 15, 2011    |   Posted by admin   |    Category: Plesk Management

While accessing the Plesk control panel, you may encounter an error message as follows:

ERROR: PleskFatalException StatInfo-> getProductVersion failed
OR
ERROR: PleskFatalException StatInfo-> getProductVersion failed: 
file_get_contents () failed: mktime() 
[<a href='function.mktime'>function.mktime</a>]

The “Plesk getProductVersion failed ” message states that either the Plesk version file /usr/local/psa/version is empty AND/OR the plesk version in the ‘psa.misc’ table is incorrect. This is mostly caused due to a failed Plesk upgrade OR by removing/installing some Plesk modules.

To fix the issue do the following:

1. First, check the Plesk version installed on the server

# rpm -qi psa

note down the ‘version’ and ‘release’ values (these values will be different on your server).

Version : 9.5.3 Release : cos5.build95301122.20

now, check the OS installed on the server (for example, on CentOS)

# cat /etc/redhat-release 
CentOS release 5.5 (Final)

Using the above Plesk and OS info, insert a line as follows (your values will differ) in the /usr/local/psa/version file.

9.5.3 CentOS 5 95301122.20

Save the file and restart the psa serivce.

2. If the above fix doesn’t work, do the following

Check the current value of  Plesk in the psa.misc table.

mysql> select * from psa.misc where param='version';

If the value is not 0953 (example from my server), run the mysql update query to set the proper value. You should use the value that is returned by the ‘rpm -qi psa’  command on your server.

mysql> update psa.misc set val="0953" where param="version";

Exit and restart mysql. That is it.

Comments Off on Plesk StatInfo-> getProductVersion failed: file_get_contents () failed

How to install a Perl Module in Linux?

April 30, 2011    |   Posted by admin   |    Category: Linux Administration

There are various ways to download and install perl modules from CPAN. In general it’s a good idea to download and install the perl module but we will see the different ways of installing the perl module.

Method 1. The easiest way is to use the perl CPAN module. SSH to the server as root and execute:

# cpan

if you are running this for the first time, it will prompt you for a few questions (default answers are fine) before providing you with the “cpan >” prompt. To install a module, say for example “Perl::OSType”, execute

cpan > install Perl::OSType

this will download and compile the module and install it server wide. To know more commands/options of cpan, type question mark ( ? ) at the cpan prompt.

Method 2. The second and the quickest method is to use perl CPAN module from the bash prompt instead of ‘cpan’ prompt. If you are on the command line of Linux, just execute

# perl -MCPAN -e 'install Perl::OSType'

Method 3. The above 2 methods are the easiest one but it is recommended to install the module manually as the above methods may not always work.

Search and download the module from http://search.cpan.org/ and then wget it on your server. Once done, extract it:

# tar -zxf Perl-OSType-1.002.tar.gz

Untar the downloaded file and go to the extracted directory. There is a README file inside the directory with the installation steps, however, here are they:

# perl Makefile.PL 
# make 
# make test 
# make install

That is it.