install pear extensions with two php versions installed at the same time in plesk

450 Views Asked by At

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.4) of php and returns an error. After reading in diferent places i found that i can run pecl commands on my 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, and i dont know where is the phpize7.1

The server is a CentOs in mediatemple, with plesk installed. I'm accessing it using ssh.

Thanks for your help.

0

There are 0 best solutions below