note 92564 deleted from function.mssql-connect by cmb
| From: | cmb@php.net | Date: | Sun, 11 Aug 2019 13:09:22 +0000 |
| Subject: | note 92564 deleted from function.mssql-connect by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-211870@lists.php.net to get a copy of this message | ||
Note Submitter: kparmelee at NOSPAM dot montgomerygeneral dot com
----
For my setup (Windows Server 2003, IIS 6, PHP 5.2.6, SQL Server 2005 Enterprise) the key to getting
a successful connection using mssql_connect was changing PHP from ISAPI mode to FastCGI mode.
1) I downloaded and installed FastCGI for IIS 6 from Microsoft http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1521
2) I modified my PHP install so it runs in FastCGI mode.
3) Opened fcgiext.ini and added this to the end.
[Types]
php=PHP
[PHP]
ExePath=c:\PHP\php-cgi.exe
InstanceMaxRequests=10000
EnvironmentVars=PHP_FCGI_MAX_REQUESTS:10000
4) I added cgi.force_redirect=0 to the â; Default timeout for socket based streams
(seconds)â section of PHP.ini
5) I made sure my SQL database was set to Windows authentication mode and I also switched
mssql.secure_connection in php.ini to on.
6) Created an SQL login for NT AUTHORITY\NETWORK SERVICE and gave it the appropriate permissions to
my database.
7) Rebooted the server