• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved MsSql in Plesk 12.5

EnriqueR

Regular Pleskian
Good Morning. I have Plesk 12.5 installed on my CentOS 6.2 Linux server and I want to know how activate the PHP mssql extension. I dont know if is installed and only I have to activate it, or should be installed in the system.

Thanks in advance.
 
By default the extension for connecting to MSSQL is not shipped in PHP packed for Plesk on Linux. But you can manually install any extension: http://devblog.plesk.com/2015/08/adding-custom-php-modules-in-plesk/
I have seen these lines to memcached:
yum search plesk-php devel
yum install make plesk-php56-devel gcc glibc-devel libmemcached-devel zlib-devel
/opt/plesk/php/5.6/bin/pecl install memcached
echo "extension=memcached.so" > /opt/plesk/php/5.6/etc/php.d/memcached.ini
plesk bin php_handler --reread

How will be to mssql extension?
I'm really lost :(
 
So first install the RPM (assuming you're on CentOS)

yum install php-mssql

Then go into the php.ini file and enable the module - in some systems you would just create the mysql.ini file in
/etc/php.d/mssql.ini

and have it say
; Enable mssql extension module
extension=mssql.so

In other systems you would add that line directly into the php.ini file
 
So first install the RPM (assuming you're on CentOS)

yum install php-mssql

Then go into the php.ini file and enable the module - in some systems you would just create the mysql.ini file in
/etc/php.d/mssql.ini

and have it say
; Enable mssql extension module
extension=mssql.so

In other systems you would add that line directly into the php.ini file
I execute:
yum install php-mssql
with output:
No package php-mssql available.
Error: Nothing to do
:(
 
OK how can we install php-mssql on the other php from plesk cause this "yum install php-mssql" only install on the Os vendor version not on all others, and need to install other php service on it too.

What is the best way ?

Im using Plesk v12.5.30_build1205150826.19 os_CentOS 7

Thanks
 
Hello, just a quick solution to install php-mssql module in Centos 7.2 with PHP 5.4.16 in Plesk 12.5 and you don't need to enable nothing else.

yum -y install yum-plugin-priorities
sed -i -e "s/\]$/\]\npriority=1/g" /etc/yum.repos.d/CentOS-Base.repo
yum -y install epel-release
sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/epel.repo
yum --enablerepo=epel -y install php-mssql

with this simply method, you only install php-mssql module without the risk to update the whole Centos with epel repo, it exclude all packages from update.

Hope it helps.

Best regards,
Horacio Stolovitzky
 
Back
Top