Archive for February, 2012



You might face problems in receiving the emails in the inbox. Checking the email logs you can find the error logs as follows :

2012-02-19 12:45:17 Berkeley DB error: /var/spool/exim/db/ratelimit: unexpected file type or format
2012-02-19 12:45:17 failed to open DB file /var/spool/exim/db/ratelimit: Bad file descriptor
2012-02-19 12:45:17 H=xxx.xxxx.xxxx [1.1.1.1] temporarily rejected connection in “connect” ACL: ratelimit database not available
2012-02-19 12:45:17 Berkeley DB error: /var/spool/exim/db/ratelimit: unexpected file type or format

The above error is basically due to exim database on the server being corrupted. You can follow the follow the following steps for this:

First stop the exim service

[root@support ~]#/etc/init.d/exim stop

[root@support ~]#cd /var/spool/exim

We will create a backup of the current exim DB.

[root@support exim]# cp -R db/ db-bak

[root@support exim]# cd db/

We will remove all the files currently existing in the folder.

[root@support db]#  rm -rf *

Now restart the exim service so the DB is auto created.

[root@support ~]# /etc/init.d/exim start

The emails should now be working fine on the server !

 

Enabling APC on cPanel server


What is APC:

The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. Its goal is to provide a free, open, and robust framework for caching and optimizing PHP intermediate code. Apart from caching opcode cache it provides a user cache for storing application data.

Installing APC on cPanel server :

Before installing APC on the server ensure eAccelerator is enabled on the server .

root@server [~]# php -m | grep eAccelerator
eAccelerator

Now lets install APC on the server . Follow the following commands on the server :

root@mailspec [~]# cd /usr/local/src

root@mailspec [~]# wget http://pecl.php.net/get/APC-3.0.19.tgz

root@mailspec [~]# tar -xzf APC-3.0.19.tgz && cd APC-3.0.19

root@mailspec [~]# phpize && ./configure –enable-apc –enable-apc-mmap –with-apxs=/usr/local/apache/bin/apxs –with-php-config=/usr/local/bin/php-config && make && make install

This should now configure APC and install it in your extension directory.

root@mailspec [~]# cd /usr/local/lib/php/extensions/no-debug-non-zts-200XXXX

You can locate a  file named apc.so in that directory.

You can now locate an entry for apc.so in the file /usr/local/lib/php.ini.

extension=”apc.so”

If you want to view APC interface via browser you can copy the file /usr/lib/php/apc.php into your sites documentroot path and access it via the browser. Ensure GD is installed on the server to view APC interface via the browser.

You can try accessing the URL:: http://domain.com/apc.com to view the interface

(replace the domain.com with your original domain name )

It will show you interface similar as follows :



Follow

Get every new post delivered to your Inbox.

Join 26 other followers