Thanks to the help here, I was able to install the right "SQL Server Native Client" and the correct php SQL .dll file on my Apache Web Server so I can now use php script to access data on our SQL Server in addition to our MySQL server.
Because there are different versions of php and SQL servers. I am only going to describe my steps, but instructions on how to properly install for other configurations can be gleaned from the links provide here.
Here are the steps needed to connect.
1. first you have to determine what files are needed. Using a text editor, I opened the "snapshot.txt" file found in the folder where my php is installed. From that I determined, I had the following
php v. 5.3.3
Thread Safe "ts"
compiled with c++ v6
A good link to use to determine your configuration is this
http://msdn.microsoft.com/en-us/library/cc296170.aspx
2. Since my web server is a different computer than my SQL server, I had to install SQL Server Native Client. For my setup I installed v 10. which I downloaded from
this link
http://www.microsoft.com/en-us/downl...s.aspx?id=3522. Since I am running XP on my webserver I chose the "X86 Package (sqlncli.msi) - 4504 KB"
3. Next I needed to install the correct .dll php driver. From the data I gathered from the snapshot.txt file, I saw that I needed "SQLSRV20.EXE. Which I had figured out from this link
http://php.net/manual/en/ref.pdo-sqlsrv.php, I scrolled down the page and clicked on the
http://download.microsoft.com/downlo...1/SQLSRV20.EXElink.
4. When I ran SQLSRV20.EXE, I choose my /php/ext folder to extract all the .dll files. It also come with the appropriate API docs so you can read the appropriate syntax for your setup.
5. The last installation step needed was to include the right .dll file to be loaded into my
php.ini file. I loaded both regular sqlservr and pdo by adding these lines in the .ini file
- extension=php_sqlsrv_53_ts_vc6.dll
- extension=php_pdo_sqlsrv_53_ts_vc6.dll
So I could choose the syntax that suited me best.
6. Then it was just a matter of reading API docs to write the correct connection script.