How to add MSSQL module for PHP 5.6.30?

Created:

2017-05-03 20:09:01 UTC

Modified:

2017-08-16 17:35:48 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to add MSSQL module for PHP 5.6.30?

Applicable to:

  • Plesk Onyx for Linux

Question

How to add MSSQL module for Plesk PHP 5.6.30?

Answer

Follow the instruction below:

1. Check version of your php:

[root@ ~]# /opt/plesk/php/5.6/bin/php -v
PHP 5.6.30 (cli) (built: Jan 20 2017 12:09:30)

2. install php56-php-mssql from remi repo:

# yum install remi-release
# yum install  php56-php-mssql

3. Copy lib file to correct place and create ini file:

# cp /opt/atomic/atomic-php56/root/usr/lib64/php/modules/mssql.so /opt/plesk/php/5.6/lib64/php/modules/
# cp /opt/remi/php56/root/etc/php.d/20-mssql.ini /opt/plesk/php/5.6/etc/php.d/

4. Reread php handlers:

# plesk bin php_handler --reread

5. Go to Tools&Settings > PHP Settings > 5.6 FPM application and check that you have this enabled:



Alternative way is to install PHP 5.6 from atomic repository and mssql module forit and register this PHP as an additional php handler in Plesk:

1. Install Atomic repository:

# wget http://www.atomicorp.com/installers/atomic
# sh atomic

2. Install Atomic PHP 5.6 and mssql module for it:

# yum install atomic-php56-php atomic-php56-php-mssql

3. Register atomic-php56 as an additional php handler in Plesk:

# /usr/local/psa/bin/php_handler --add -displayname atomic-php-5.6.3 -path /opt/atomic/atomic-php56/root/usr/bin/php-cgi -clipath /opt/atomic/atomic-php56/root/usr/bin/php -phpini /opt/atomic/atomic-php56/root/etc/php.ini -type fastcgi -id atomic-php56

Another possible solution is Microsoft Drivers for PHP for SQL Server . Note that these solutions were not tested on Plesk, thus it's not suported.

Have more questions? Submit a request
Please sign in to leave a comment.