Skip to main content

pear , pecl not working after EasyApach4

Comments

21 comments

  • JacobPerkins
    Hi, PEAR should still work fine. All the PEAR installer does is download the extensions to the '/home/$user/php' directory. I've verified this works fine on both 11.50 and 11.52. You can install PEAR extensions inside cPanel -> PHP PEAR Packages. PECL however is absolutely broken with EasyApache 4. We need to do a bit of work on it, but we haven't had a chance to look at it yet. We hope to have this fixed up in 11.54. Thanks for your patience, and thanks for trying out EasyApache 4!
    0
  • Jesse Lanning
    I got this to work by editing the pecl script. From command line as root:
    pico`which pecl`
    On the last line where it says:
    exec $PHP -C -n -q $INCARG -d date.....
    I simply removed the -n flag and the PHP Pecl Module Installer in WHM began working again. I am not sure if this breaks anything else so do so at your own risk.
    0
  • sadlyblue
    I got this to work by editing the pecl script. From command line as root:
    pico`which pecl`
    On the last line where it says:
    exec $PHP -C -n -q $INCARG -d date.....
    I simply removed the -n flag and the PHP Pecl Module Installer in WHM began working again. I am not sure if this breaks anything else so do so at your own risk.

    Thank you. This worked for me also, after sometime searching, finally found your solution.
    0
  • stratogod
    Same issue here and it looks like there won't be a fix for WHM 11.56 either for EA4 (Current Status of EasyApache 4 - EasyApache 4 - cPanel Documentation) For the time being I am doing the fix Jesse shared and removing the 'n' flag - which does solve the problem, however, I am a tad weary on it causing issues down the road... hopefully not though! Thanks for sharing Jesse.
    0
  • stratogod
    I'm back to report that although this temp fix does allow you to install PHP extensions using PECL via WHM Module Installer - unfortunately, it still doesn't work. The error message goes away and it says the package is installed, however, the new extension still needs to be rebuilt into PHP somehow. I know you guys are still working on a fix for PEAR/PECL for EA4, but in the meantime, is there a manual way to force EA4 to rebuild using new extensions that were added via PECL? I have 2 PHP extensions (memcached and redis) that I have manually installed using PECL in command line and everything appears to be fine, however, phpinfo and php -m continues to NOT show they are installed - which leads me to believe PHP/Apache need to be rebuilt... like re-configuring a provision/plan in EA4, only a manual way to do it via command line? Hope this makes sense??? Thanks!
    0
  • JacobPerkins
    I'm back to report that although this temp fix does allow you to install PHP extensions using PECL via WHM Module Installer - unfortunately, it still doesn't work. The error message goes away and it says the package is installed, however, the new extension still needs to be rebuilt into PHP somehow. I know you guys are still working on a fix for PEAR/PECL for EA4, but in the meantime, is there a manual way to force EA4 to rebuild using new extensions that were added via PECL? I have 2 PHP extensions (memcached and redis) that I have manually installed using PECL in command line and everything appears to be fine, however, phpinfo and php -m continues to NOT show they are installed - which leads me to believe PHP/Apache need to be rebuilt... like re-configuring a provision/plan in EA4, only a manual way to do it via command line? Hope this makes sense??? Thanks!

    Hi, After building the PECL module, you need to add the .so to the appropriate php.d directory and then add the INI entry to the appropriate php.ini as well. After that is complete, the module should be available via PHP. I hope this helps!
    0
  • chrisbuk
    HI Guys in WHMCS i get an error with a custom module that requires PEAR
    Fatal error: require(): Failed opening required 'PEAR.php' (include_path='/home/username/public_html/vendor/phpseclib/phpseclib/phpseclib:.;/path/to/php/pear:/home/username/public_html/modules/registrars/centralnic/php-epp') in /home/username/public_html/modules/registrars/centralnic/centralnic.php on line 14
    I upgraded to EA4 and using 56 build 3. Does anyone have a guide on how to get PEAR installed on EA4/PHP5.6
    0
  • JacobPerkins
    Hi Can you please put in a ticket on this? We've tested WHMCS on EA4 quite heavily, and the error you posted looks to point to a module that might need updating. However, if we can look at it we'll be able to pin it down and assist in getting it fixed.
    0
  • chrisbuk
    Hi Can you please put in a ticket on this? We've tested WHMCS on EA4 quite heavily, and the error you posted looks to point to a module that might need updating. However, if we can look at it we'll be able to pin it down and assist in getting it fixed.

    Hey Jacob, Great seeing you the other night! I already have a ticket open and was advised to go back to EA3 which i've not yet done, see ticket 7520075
    0
  • chrisbuk
    anyone got a workaround for this yet?
    0
  • cPanelMichael
    I already have a ticket open and was advised to go back to EA3 which i've not yet done, see ticket 7520075

    Would you mind reopening this support ticket, or opening a new ticket, and referencing this thread in the ticket so we can take a closer look again? Thank you.
    0
  • chrisbuk
    Would you mind reopening this support ticket, or opening a new ticket, and referencing this thread in the ticket so we can take a closer look again? Thank you.

    Done
    0
  • mcgee
    I got this to work by editing the pecl script. From command line as root:
    pico`which pecl`
    On the last line where it says:
    exec $PHP -C -n -q $INCARG -d date.....
    I simply removed the -n flag and the PHP Pecl Module Installer in WHM began working again. I am not sure if this breaks anything else so do so at your own risk.

    doing vi /usr/local/bin/pecl and removing the -n works fine cPanel should really fix this in the next update saves time.
    0
  • cartenz
    doing vi /usr/local/bin/pecl and removing the -n works fine cPanel should really fix this in the next update saves time.

    I try this method. But get this error pecl install memcache PHP: syntax error, unexpected '$' in Unknown on line 10
    0
  • cPanelMichael
    I try this method. But get this error

    You may want to revert to EasyApache 3 if the issue persists and consider updating to EasyApache 4 when this issue is addressed in cPanel 58: How to Install or Uninstall EasyApache 4 - EasyApache 4 - cPanel Documentation Thank you.
    0
  • JacobPerkins
    Hi everyone, I wanted to let you know that today you'll be getting updated packages that include our SCL PEAR & PECL packages for EA4. They are required for each ea-php## package, so you'll automatically get them. This will include a working PEAR & PECL binary for each supported PHP version. Full UI support should be coming in v58 of cPanel & WHM. I hope this helps! Let us know if you come across any problems or have any suggestions.
    0
  • butterthebiscuit
    Jacob P, Is there anything we need to do to with the updates to get PECL working? I'm still getting the same error. Unless I'm reading your message incorrectly, it sounds like the update was automatic and should be working now.
    0
  • JacobPerkins
    Hi, Try doing a 'yum update'
    0
  • JacobPerkins
    Hi everyone! v57.9999.76 has been updated to the EDGE tier, and it includes the UI fixes for PECL & PEAR. Try it out and let us know how it goes!
    0
  • Jaison V John
    Hi @cPJacob The pecl installation of geoIP ends in the make error. Any ideas? =============================================== libtool: compile: cc -I. -I/root/tmp/pear/geoip -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootFWGEh9/geoip-1.0.8/include -I/root/tmp/pear/pear-build-rootFWGEh9/geoip-1.0.8/main -I/root/tmp/pear/geoip -I/opt/cpanel/ea-php70/root/usr/include/php -I/opt/cpanel/ea-php70/root/usr/include/php/main -I/opt/cpanel/ea-php70/root/usr/include/php/TSRM -I/opt/cpanel/ea-php70/root/usr/include/php/Zend -I/opt/cpanel/ea-php70/root/usr/include/php/ext -I/opt/cpanel/ea-php70/root/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/geoip/geoip.c -fPIC -DPIC -o .libs/geoip.o /root/tmp/pear/geoip/geoip.c:220:44: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1 /root/tmp/pear/geoip/geoip.c: In function "zif_geoip_db_filename": /root/tmp/pear/geoip/geoip.c:220: error: "RETURN_STRING" undeclared (first use in this function) /root/tmp/pear/geoip/geoip.c:220: error: (Each undeclared identifier is reported only once /root/tmp/pear/geoip/geoip.c:220: error: for each function it appears in.) /root/tmp/pear/geoip/geoip.c: In function "zif_geoip_time_zone_by_country_and_region": /root/tmp/pear/geoip/geoip.c:583: error: "RETURN_STRING" undeclared (first use in this function) make: *** [geoip.lo] Error 1 ERROR: `make' failed [root@l1 ~]# ll -d /tmp drwxrwxrwt 46 root root 20480 Mar 22 07:06 /tmp [root@l1 ~]# ll -d /root/tmp/pear/ drwxr-xr-x 2 root root 4096 Mar 22 07:04 /root/tmp/pear/ [root@l1 ~]# ===============================================
    0
  • Jaison V John
    Hi @cPJacob, Sorry to disturb your time. If anyone encounters same problem, please use the fix from the PHP Pecl "geoip" with PHP 7 which indicates to use the complete URL of geoip.
    0

Please sign in to leave a comment.