• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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