Issue

Zend Server 9 and higher includes PHP version 7, which no longer provides support for the old mssql extension to connect to Microsoft SQL Server databases.  Instead, the pdo_dblib extension can be used. 

Environment

Zend Server for IBM i version 9 and higher, running on any supported version of IBM i OS.

Resolution

In order to connect to a Microsoft SQL Server using PHP 7, you will need to use the pdo_dblib extension.  This is because the authors of the mssql extension decided that procedural processing should be deprecated and everyone should use the object oriented PDO method to access the data.  So, they opted to not upgrade mssql to be compatible with PHP 7.

This article will not explain the PDO syntax.  You can learn more about that topic in the PHP manual:

Microsoft SQL Server and Sybase Functions (PDO_DBLIB)

To enable pdo_dblib, please log into your Zend Server User Interface, and navigate to PHP -> Extensions.  Find the entry for pdo_dblib on the list.  If it is not currently set to "Enabled", highlight the line for pdo_dblib by clicking into the check box on the left of the line.  When the check mark appears, the button labeled "Enable" at the top of the table will become active.  Click the "Enable" button.  After some processing you will be prompted to restart.  The restart takes your web site down for a short while, so please schedule this activity for a time when that will be acceptable.

To set up your connection directives for pdo_dblib, you will need to edit the file /usr/local/zendphp7/etc/freetds.conf.