Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Problem installing PECL mailparse-2.1.6 - XML Extension not found

Discussion in 'General Discussion' started by brooks_hunt, Mar 15, 2018.

Tags:
  1. brooks_hunt

    brooks_hunt Member

    Joined:
    Jan 14, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    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
     
  2. brooks_hunt

    brooks_hunt Member

    Joined:
    Jan 14, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    In the command line: pecl install mailparse-2.1.6
    I get a lot of errors.

    /usr/local/lib/php/PEAR/Command.php on line 249
    XML Extension not found
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,396
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. brooks_hunt

    brooks_hunt Member

    Joined:
    Jan 14, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    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
    
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,396
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. brooks_hunt

    brooks_hunt Member

    Joined:
    Jan 14, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    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 
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,396
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice