note 76552 deleted from function.mssql-connect by danbrown
| From: | danbrown@php.net | Date: | Sun, 07 Dec 2008 19:13:26 +0000 |
| Subject: | note 76552 deleted from function.mssql-connect by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-147855@lists.php.net to get a copy of this message | ||
Note Submitter: mariodivece at yahoo dot com
----
Hi, just trying to save some time for those using windows Vista + WAMP 5.1.7 (Apache as the HTTP
server, not IIS 7)
I was having trouble connecting to SQL Server 2005 Express and I hope the following procedure helps
someone out there.
0. Stop all services from WAMP
1. get ntwdblib.dll version 2000.80.194.0 and copy it to the following locations:
a) wamp\php\
b) wamp\Apache2\bin\
c) windows\system32\
2. Configure SQL Server to accept TCP connections and Named Pipes as discussed in earlier posts. (no
need to change port settings)
3. Configure SQL Server for Mixed mode authentication and remember the password you set for sa
4. Restart SQL Server Service
5. Open wamp\php\php.ini and set the mssql.secure_connection = On
6. Right-click your wamp folder and click on Properties. Got to the security tab and click on
Edit... Now click on Add and type in 'Everyone' without the single quotes
7. Once you added 'Everyone' make sure you check the Full Control checkbox in the
permissions list
8. Click on start all services from the WAMP menu
to connect, do something like the following:
$cnMsSQL = mssql_connect('.\SQLEXPRESS', 'sa', 'yourpassword') or
trigger_error(mssql_get_last_message(),E_USER_ERROR);
Well, that's it... that's how I made it work. Hope that this solves someone's issue