note 81594 added to ref.mssql
| From: | SanderWartenberg at osu1 dot php dot net | Date: | Wed, 05 Mar 2008 12:19:22 +0000 |
| Subject: | note 81594 added to ref.mssql | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136760@lists.php.net to get a copy of this message | ||
Running on the following settings I couldn't connect to my local SQL server.
- Apache 2.2.6
- PHP 5.2.5
- SQL Server 2005
- Windows XP SP2
The problem lies within the wrong dynamic library that is included in Apache and PHP. To fix this
problem follow this steps:
1. Download the good version of ntwdblib.dll (2000.80.194.0) http://webzila.com/dll/1/ntwdblib.zip
2. Overwrite C:\wamp\bin\apache\apache2.2.6\bin\ntwdblib.dll
3. Overwrite C:\wamp\bin\php\php5.2.5\ntwdblib.dll
4. Start the SQL Server Configuration Manager -> Protocols
5. Enable "named pipes" and "tcp/ip"
6. Right-click "tcp/ip" -> Properties tab "IP addresses"
7. Fill in "TCP Dynamic Ports" with 1433
8. Restart SQL Server AND Apache, PHP and all the other services
Try the following mssql_connect:
mssql_connect('localhost,1433', USERNAME, PASSWORD);
Good luck!
----
Server IP: 83.137.20.135
Probable Submitter: 84.86.57.244
----
Manual Page -- http://www.php.net/manual/en/ref.mssql.php
Edit -- https://master.php.net/note/edit/81594
Del: integrated -- https://master.php.net/note/delete/81594/integrated
Del: useless -- https://master.php.net/note/delete/81594/useless
Del: bad code -- https://master.php.net/note/delete/81594/bad+code
Del: spam -- https://master.php.net/note/delete/81594/spam
Del: non-english -- https://master.php.net/note/delete/81594/non-english
Del: in docs -- https://master.php.net/note/delete/81594/in+docs
Del: other reasons-- https://master.php.net/note/delete/81594
Reject -- https://master.php.net/note/reject/81594
Search -- https://master.php.net/manage/user-notes.php