Please help how to install and configuring sqlsrv extension on Ubuntu 16 with xampp

Could someone kindly write step by step tutorial to install and configuring sqlsrv extension on my xampp ?

Any help so much appreciated…

Thank you

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @andrenoto,

I take it you mean a PHP SQLSRV extension, am I right?

I’ve found a couple of tutorials online outlining the following process:

To install the PHP SQLSRV extension, SSH in to your server as root and run the following commands to install prerequisites:

On Ubuntu 16.04

curl -s | sudo apt-key add -
sudo bash -c "curl -s > /etc/apt/sources.list.d/mssql-release.list"
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get -y install msodbcsql17 mssql-tools
sudo apt-get -y install unixodbc-dev

Next, run the following commands to install the extension:

sudo apt-get -y install gcc g++ make autoconf libc-dev pkg-config
sudo pecl7.X-sp install sqlsrv
sudo pecl7.X-sp install pdo_sqlsrv

Once installed, create configuration files for the extension and restart PHP by running the following commands as root:

sudo bash -c "echo > /etc/php7.X-sp/conf.d/sqlsrv.ini"
sudo bash -c "echo > /etc/php7.X-sp/conf.d/pdo_sqlsrv.ini"
sudo service php7.X-fpm-sp restart

Please note that this is based on one of the tutorials I found in Google, make sure to create a backup prior to starting the process.