PHP on IIS7 with (PDO) MS-SQL support
I am running an IIS 7 window server and the relevant part of my phpinfo configuration command is currently reporting this:
cscript / nologo configure.js ...... "--without-mssql" "--without-pdo-mssql" "--without-pi3web" ... "--with-mcrypt = static"
What do I need to do for my server so that I can see with -mssql above and not see without -mssql?
I was once told to recompile PHP. This is where the dollar left off. Because this PHP came with the IIS installation, so we never needed to compile PHP before. Re-compilation ... is this something from the command line?
source to share
Microsoft SQL Server support and extensions no longer ship with PHP. To link PHP to SQL Server, you need Microsoft Drivers for PHP for SQL Server :
Microsoft Drivers for PHP for SQL Server is a PHP 5 extension that provides data access for SQL Server 2005 and later, including SQL Azure.
The driver download page has four versions to choose from. Refer to the System Requirements page to determine which version you need. You must install the correct driver for your operating system + SQL Server + PHP version .
You will also need one of these depending on which driver you choose (they must be installed separately):
- SQL Server Native Client
- Microsoft ODBC Driver 11 for SQL Server
The installer simply extracts the files at the specified location. The files must be in the PHP extensions directory. Files are PHP extensions. The file names indicate:
- should be used with safe / thread safe PHP version
- should be used with PHP version 5.4, 5.5, 5.6, ...
- provides interface / PDO interface
Include extensions in the file
to ensure stream safety and PHP versions match.
Check phpinfo to see if extensions are loaded. Check
to make sure the extensions are working.
source to share