• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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