• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Resolved Problem installing pear extensions with two php version installed

Jose Pinto

New Pleskian
I recently installed php 7.1 for one site and my older sites are using php 5.4.

Here is the problem.
I need to install sqlsrv and pdo_sqlsrv extensions for php. This two extensions only work with php >=7.0 in linux.
But when i run the command "pecl install sqlsrv" the installer takes the older version (5) of php.
After reading in diferent places i found that i can run pecl commands on php7 like this:

"opt/plesk/php/7.1/bin/pecl install sqlsrv"

It works. But i get this error:

"running: phpize5.4
sh: phpize5.4: command not found
ERROR: phpize failed"

I dont know hot to change the pear phpize folder, and i dont know where is the phpize7.1.
I have a CentOS with plesk and I execute the commands using ssh.

Thanks for your help.
 
If you want to compile sqlsrv PHP module for PHP 7.1 version, you should run

# /opt/plesk/php/7.1/bin/pecl install sqlsrv

For PHP 5.4 version run command

# /opt/plesk/php/5.4/bin/pecl install sqlsrv

Note, that packages plesk-php71-devel and plesk-php54-devel should be installed on the server. These packages contain corresponding version of pecl (/opt/plesk/php/7.1/bin/pecl and /opt/plesk/php/7.1/bin/pecl)
 
On ubuntu 16.04 the required package is named: plesk-php71-dev
This will also fix the problem when running
/opt/plesk/php/7.1/bin/pecl install sqlsrv
uses the OS vendor provided PHP and puts the generated module (.so file) in e.g. /usr/lib/php/20151012/ , even though both PECL and PEAR have all correct config variables (ext_dir, php_bin...) - I checked with /opt/plesk/php/7.1/bin/pecl config-get ext_dir
Yeah, I lost half of a sunny Saturday with this.
 
Back
Top