2.8.21. Working with MSSQL

The hosting tools are available to work with external Microsoft SQL Server (MSSQL) databases.

PHP 5.2-5.6 has an extension available by default Mssql.

In PHP 7.0-8.1 modules can be included:

To turn it on, just open PHP settings the desired site and set the appropriate checkboxes in the block "PHP modules".

If the script needs to be run from console or through cron, then in the launch command specify the php.ini of the site, in the settings of which the module for working with MSSQL is enabled, or use the parameter -d 'extension=sqlsrv.so' when calling the PHP interpreter:

/usr/local/php74/bin/php -d 'extension=sqlsrv.so' /home/way/to/script/script.php