SOLVED Multi PHP versions : PEAR install fails (WHM) How to install from SSH for all php versions

Dean_ONP

Member
Aug 29, 2016
10
2
3
Gold Coast
cPanel Access Level
Root Administrator
This is for a MultiPHP server with PHP 5.6 set as default.
Also have 7.1, 7.2 installed.

Need to install the following extensions for PHP version 7.2:
Structures_DataGrid (0.9.3)
Structures_DataGrid_DataSource_PDO (0.2.0)

When attempting this via
WHM > Software > Module Installers > PHP Extensions and Applications Package
Receive the following errors:

Failed to download pear/Structures_DataGrid within preferred state "stable", latest release is version 0.9.3, stability "beta", use "channel://pear.php.net/Structures_DataGrid-0.9.3" to install
install failed.

Failed to download pear/Structures_DataGrid_DataSource_PDO within preferred state "stable", latest release is version 0.2.0, stability "beta", use "channel://pear.php.net/Structures_DataGrid_DataSource_PDO-0.2.0" to install
install failed

When installing from SSH (Command line) with the following this works, but only for the default PHP version (5.6).
> pear channel-update pear.php.net
> pear install channel://pear.php.net/Structures_DataGrid-0.9.3
> pear install Structures_DataGrid_DataSource_PDO-0.2.0

How can I install these for ea-php72?
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello @Dean_ONP,

You have to use the command line to install PEAR modules in the beta state. Here's the commands you'd use to install these PEAR modules with PHP version 7.2:

Code:
# /opt/cpanel/ea-php72/root/usr/bin/pear install channel://pear.php.net/Structures_DataGrid-0.9.3
# /opt/cpanel/ea-php72/root/usr/bin/pear install channel://pear.php.net/Structures_DataGrid_DataSource_PDO-0.2.0
However, keep in mind both of these PEAR modules are unmaintained. You can see on the links below that both modules were last updated in 2012:

Structures_DataGrid
Structures_DataGrid_DataSource_PDO

Thank you.
 
  • Like
Reactions: Dean_ONP