Problem installing PECL mailparse-2.1.6 - XML Extension not found

brooks_hunt

Member
Jan 14, 2014
8
0
1
cPanel Access Level
Root Administrator
I'm using PHP 5.6 on CENTOS 7.4

I want to install PECL mailparse-2.1.6 (unavailable in Apache 4 only version 3 only compatible with PHP 7). php56-php-xml is installed
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

Upon testing, the installation completed, but only after installing some required modules and packages. EX:

Code:
yum install re2c
yum install ea-php56-php-mbstring
Once those were installed, I was able to manually install this PECL module for PHP 5.6 via the command line. EX:

Code:
/opt/cpanel/ea-php56/root/usr/bin/pecl install https://pecl.php.net/get/mailparse-2.1.6.tgz
Can you let us know the full output you see when attempting to run the above command if it continues to fail? Please use CODE tags when pasting the output.

Thank you.
 

brooks_hunt

Member
Jan 14, 2014
8
0
1
cPanel Access Level
Root Administrator
Code:
yum install re2c
yum install ea-php56-php-mbstring
Were already installed.

Code:
/opt/cpanel/ea-php56/root/usr/bin/pecl install https://pecl.php.net/get/mailparse-2.1.6.tgz
Installed fine. But I'm still having issues. I'm trying to parse a piped email.

The error I get with the bounced email is:
Code:
PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/cpanel/ea-php56/root/usr/lib64/php/modules/xmldiff.so' - /opt/cpanel/ea-php56/root/usr/lib64/php/modules/xmldiff.so: undefined symbol: dom_node_class_entry in Unknown on line 0

PHP Fatal error:  Class 'PhpMimeMailParser\Parser' not found
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/cpanel/ea-php56/root/usr/lib64/php/modules/xmldiff.so' - /opt/cpanel/ea-php56/root/usr/lib64/php/modules/xmldiff.so: undefined symbol: dom_node_class_entry in Unknown on line 0

PHP Fatal error: Class 'PhpMimeMailParser\Parser' not found
Hello,

First, make sure the xmldiff PECL module is installed for PHP version 5.6. EX:

Code:
/opt/cpanel/ea-php56/root/usr/bin/pecl install https://pecl.php.net/get/xmldiff-1.1.2.tgz
If it's already installed, please try moving the "extension=" lines for xmldiff.so and mailparse.so from the following file:

Code:
/opt/cpanel/ea-php56/root/etc/php.d/02-pecl.ini
Once you've removed those two lines from the above file, manually add the extension= entries in new files for those modules. EX:

Code:
vi /opt/cpanel/ea-php56/root/etc/php.d/xmldiff.ini
vi /opt/cpanel/ea-php56/root/etc/php.d/mailparse.ini
The end result should look like this:

Code:
# cat /opt/cpanel/ea-php56/root/etc/php.d/xmldiff.ini
extension="xmldiff.so"
# cat  /opt/cpanel/ea-php56/root/etc/php.d/mailparse.ini
extension="mailparse.so"
Then, restart Apache:

Code:
/scripts/restartsrv_httpd
Let us know if this helps.

Thank you.
 

brooks_hunt

Member
Jan 14, 2014
8
0
1
cPanel Access Level
Root Administrator
Still getting errors with email pipe.
Code:
PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/cpanel/ea-php56/root/usr/lib64/php/modules/mailparse.so' - /opt/cpanel/ea-php56/root/usr/lib64/php/modules/mailparse.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Fatal error:  Class 'PhpMimeMailParser\Parser' not found
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463