Install 'MailParse' extension - cPanel




The following installation will work with php-5.3.x

root@server [~]# cd /usr/local/src
root@server [/usr/local/src]# wget http://pecl.php.net/get/mailparse-2.1.5.tgz
root@server [/usr/local/src]# tar xvzf mailparse-2.1.5.tgz
root@server [/usr/local/src]# cd mailparse-2.1.5
root@server [/usr/local/src/mailparse-2.1.5]# phpize
root@server [/usr/local/src/mailparse-2.1.5]# ./configure
root@server [/usr/local/src/mailparse-2.1.5]# make
root@server [/usr/local/src/mailparse-2.1.5]# make install
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20090626/


Once the installation is completed, you can find 'mailparse.so' file in a directory like /usr/local/lib/php/extensions/no-debug-non-zts-20090626/.

Open the php.ini file and add this extesnion. Here in my case i added an entry like the following.


root@server [~]# vi /usr/local/lib/php.ini
.
.
extension = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626/mailparse.so"
.
.


Restart Apache to make the changes in effect.

root@server [~]# /etc/init.d/httpd restart


Verify wheter the extesnions is loaded or not.

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

That's it...

Leave a Reply