The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

pear , pecl not working after EasyApach4

Discussion in 'EasyApache' started by vipin, Oct 27, 2015.

Tags:
  1. vipin

    vipin Active Member

    Joined:
    Aug 23, 2013
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    After using EasyApache4 , PHP extensions cannot be installed using pear / pecl. Cannot find any php-pear packages in easyapache4 repositories. What is the package name ?

    System details:

    Code:
    root@server [~]# grep '' /etc/redhat-release /usr/local/cpanel/version /var/cpanel/envtype ; grep CPANEL= /etc/cpupdate.conf ; httpd -v ; php -v ; mysql -V
    
    /etc/redhat-release:CentOS release 6.7 (Final)
    
    /usr/local/cpanel/version:11.52.0.20
    
    /var/cpanel/envtype:virtuozzo
    
    CPANEL=release
    
    Server version: Apache/2.4.16 (cPanel)
    
    Server built:  Oct  2 2015 14:55:33
    
    PHP 5.5.30 (cli) (built: Oct  5 2015 18:10:12)
    
    Copyright (c) 1997-2015 The PHP Group
    
    Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
    
    mysql  Ver 14.14 Distrib 5.5.46, for Linux (x86_64) using readline 5.1
    
    

    Error Message when trying to install extension using PECL. It still use old PHP libraries.

    Code:
    root@server [~]# pecl install gd
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Notice: Undefined index: honorsbaseinstall in Role.php on line 173
    
    Notice: Undefined index: honorsbaseinstall in Role.php on line 173
    
    Notice: Undefined index: honorsbaseinstall in Role.php on line 173
    
    Notice: Undefined index: honorsbaseinstall in Role.php on line 173
    
    Notice: Undefined index: honorsbaseinstall in Role.php on line 173
    
    Notice: Undefined index: honorsbaseinstall in Role.php on line 173
    
    Notice: Undefined index: honorsbaseinstall in Role.php on line 173
    
    Notice: Undefined index: honorsbaseinstall in Role.php on line 173
    
    Notice: Undefined index: honorsbaseinstall in Role.php on line 173
    
    Notice: Undefined index: honorsbaseinstall in Role.php on line 173
    
    Notice: Undefined index: installable in Role.php on line 139
    
    Notice: Undefined index: installable in Role.php on line 139
    
    Notice: Undefined index: installable in Role.php on line 139
    
    Notice: Undefined index: installable in Role.php on line 139
    
    Notice: Undefined index: installable in Role.php on line 139
    
    Notice: Undefined index: installable in Role.php on line 139
    
    Notice: Undefined index: installable in Role.php on line 139
    
    Notice: Undefined index: installable in Role.php on line 139
    
    Notice: Undefined index: installable in Role.php on line 139
    
    Notice: Undefined index: installable in Role.php on line 139
    
    Notice: Undefined index: phpfile in Role.php on line 204
    
    Notice: Undefined index: phpfile in Role.php on line 204
    
    Notice: Undefined index: phpfile in Role.php on line 204
    
    Notice: Undefined index: phpfile in Role.php on line 204
    
    Notice: Undefined index: phpfile in Role.php on line 204
    
    Notice: Undefined index: phpfile in Role.php on line 204
    
    Notice: Undefined index: phpfile in Role.php on line 204
    
    Notice: Undefined index: phpfile in Role.php on line 204
    
    Notice: Undefined index: phpfile in Role.php on line 204
    
    Notice: Undefined index: phpfile in Role.php on line 204
    
    Notice: Undefined index: config_vars in Role.php on line 46
    
    Notice: Undefined index: config_vars in Role.php on line 46
    
    Notice: Undefined index: config_vars in Role.php on line 46
    
    Notice: Undefined index: config_vars in Role.php on line 46
    
    Notice: Undefined index: config_vars in Role.php on line 46
    
    Notice: Undefined index: config_vars in Role.php on line 46
    
    Notice: Undefined index: config_vars in Role.php on line 46
    
    Notice: Undefined index: config_vars in Role.php on line 46
    
    Notice: Undefined index: config_vars in Role.php on line 46
    
    Notice: Undefined index: config_vars in Role.php on line 46
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in Command.php on line 249
    
    Warning: Invalid argument supplied for foreach() in /usr/local/lib/php/PEAR/Command.php on line 249
    XML Extension not found
     
  2. cPJacob

    cPJacob cPanel Product Owner
    Staff Member

    Joined:
    May 2, 2014
    Messages:
    510
    Likes Received:
    66
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    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!
     
  3. Jesse Lanning

    Jesse Lanning Registered

    Joined:
    Nov 27, 2015
    Messages:
    2
    Likes Received:
    5
    Trophy Points:
    3
    Location:
    Syracuse
    cPanel Access Level:
    Root Administrator
    I got this to work by editing the pecl script. From command line as root:
    Code:
    pico`which pecl`
    On the last line where it says:
    Code:
    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.
     
    stratogod, M4kr, sadlyblue and 2 others like this.
  4. sadlyblue

    sadlyblue Registered

    Joined:
    Mar 5, 2015
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Thank you. This worked for me also, after sometime searching, finally found your solution.
     
    M4kr likes this.
  5. stratogod

    stratogod Registered

    Joined:
    Feb 1, 2016
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Columbia, MO, USA
    cPanel Access Level:
    Root Administrator
    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.
     
  6. stratogod

    stratogod Registered

    Joined:
    Feb 1, 2016
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Columbia, MO, USA
    cPanel Access Level:
    Root Administrator
    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!
     
  7. cPJacob

    cPJacob cPanel Product Owner
    Staff Member

    Joined:
    May 2, 2014
    Messages:
    510
    Likes Received:
    66
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    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!
     
  8. chrisbuk

    chrisbuk Well-Known Member
    PartnerNOC

    Joined:
    Dec 7, 2003
    Messages:
    393
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Liverpool, United Kingdom
    cPanel Access Level:
    DataCenter Provider
    HI Guys

    in WHMCS i get an error with a custom module that requires PEAR

    Code:
    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
     
  9. cPJacob

    cPJacob cPanel Product Owner
    Staff Member

    Joined:
    May 2, 2014
    Messages:
    510
    Likes Received:
    66
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    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.
     
  10. chrisbuk

    chrisbuk Well-Known Member
    PartnerNOC

    Joined:
    Dec 7, 2003
    Messages:
    393
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Liverpool, United Kingdom
    cPanel Access Level:
    DataCenter Provider
    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
     
  11. chrisbuk

    chrisbuk Well-Known Member
    PartnerNOC

    Joined:
    Dec 7, 2003
    Messages:
    393
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Liverpool, United Kingdom
    cPanel Access Level:
    DataCenter Provider
    anyone got a workaround for this yet?
     
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
    #12 cPanelMichael, May 9, 2016
    Last edited by a moderator: May 10, 2016
  13. chrisbuk

    chrisbuk Well-Known Member
    PartnerNOC

    Joined:
    Dec 7, 2003
    Messages:
    393
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Liverpool, United Kingdom
    cPanel Access Level:
    DataCenter Provider
    Done
     
  14. mcgee

    mcgee Registered

    Joined:
    Jan 22, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    doing vi /usr/local/bin/pecl and removing the -n works fine cPanel should really fix this in the next update saves time.
     
  15. cartenz

    cartenz Registered

    Joined:
    May 14, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Solo
    cPanel Access Level:
    Website Owner
    I try this method.
    But get this error

    pecl install memcache
    PHP: syntax error, unexpected '$' in Unknown on line 10
     
  16. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  17. cPJacob

    cPJacob cPanel Product Owner
    Staff Member

    Joined:
    May 2, 2014
    Messages:
    510
    Likes Received:
    66
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    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.
     
  18. butterthebiscuit

    butterthebiscuit Registered

    Joined:
    May 27, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Roanoke, VA
    cPanel Access Level:
    Root Administrator
    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.
     
  19. cPJacob

    cPJacob cPanel Product Owner
    Staff Member

    Joined:
    May 2, 2014
    Messages:
    510
    Likes Received:
    66
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi,

    Try doing a 'yum update'
     
  20. cPJacob

    cPJacob cPanel Product Owner
    Staff Member

    Joined:
    May 2, 2014
    Messages:
    510
    Likes Received:
    66
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    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!
     
Loading...

Share This Page