Mailparse is a PHP extension which allows PHP software to extract various components of an email. Though this post comes quite different than normal, we found that a lot of people have problem installing mailparse on their servers with older version of PHP.
The problem is if you try installing Mailparse using CPanel WHM, you can install only the latest version of Mailparse which requires PHP 7 or greater. This does not allow you install older versions.
KKE Soteco has expertise in handling your servers over cloud or dedicated Bare Metal Servers. The best way to install Mailparse for that matter any PHP extension on your MultiPHP system on any of your linux flavours is using the following Shell commands.
You need to be able to connect to your server using Telnet. You can use tools like Putty. (http://www.putty.org )
cd /usr/local/src wget https://pecl.php.net/get/mailparse-2.1.6.tgz tar xvzf mailparse-2.1.6.tgz cd /usr/local/src/mailparse-2.1.6
PHPize is a shell command which creates environment for extension installation. Replace XX from ea-phpXX with your php version. Below we wanted to install mailparse on php5.6 and hence ea-php56
$ ./configure $ make $ make install
After running the above command, copy location of the mailparse.so file. In our case, the file was installed in /usr/local/lib/php/extensions/no-debug-non-zts-20090626/
Edit php.ini using the "MultiPHP INI Editor" in WHM add the following statement in the php.ini file. Ensure that the file is in this directory by running the following command
You can use nano as well for editing the php.ini file, however, in MultiPHP systems it becomes difficult to identify the location of the php.ini file. Add the following text.
In no respect shall KKE Soteco Pvt. Ltd incur any liability for any damages, including, but limited to, direct, indirect, special, or consequential damages arising out of, resulting from, or any way connected to the use of the item, whether or not based upon warranty, contract, tort, or otherwise; whether or not injury was sustained by persons or property or otherwise; and whether or not loss was sustained from, or arose out of, the results of, the item, or any services that may be provided by KKE Soteco Pvt. Ltd.