Jump to content

Archived

This topic is now archived and is closed to further replies.

argoSquirrel

XAMPP and MS SQL 2005 Express

Recommended Posts

I am attempting to connect to MS SQL 2005 Express from Php 5 on Apache on XP Pro (db server and web server on same machine).

I was running this all on OS X until I just got fed up with mysql and went to MS SQL which I use at work and prefer.  I'm pretty sure I have MS SQL set up properly with TCP/IP and SQL Authentication.  I have a user I created that I can log in to fine from other apps using SQL Authentication.  I replaced the ntwdblib.dll file with the new .194  version and have attempted to connect using mssql_connect() and odbc_connect().

Everytime I attempt to connect I get an error about not finding the server, not an authentication error.  In other words, I can't even get past step 1.

Could this be a problem caused by running xampp and not a full install of apache and php5?  Should I try to install IIS 5.1?  Anyone tried the same thing and can share some advice?

Hope I can get this up.  I scoured a lot of resources and haven't turned up much.  Hate to have to code it in ASP.net...

Thanks guys.

Share this post


Link to post
Share on other sites
If you installed mssql did you enable the php_mssql.dll extension in the php.ini?

Share this post


Link to post
Share on other sites
[quote author=wildteen88 link=topic=106022.msg423844#msg423844 date=1156842344]
If you installed mssql did you enable the php_mssql.dll extension in the php.ini?
[/quote]
Yes, all extensions are turned on in php.ini.

Share this post


Link to post
Share on other sites
Just FYI, I was messing around in php.ini in xampp and noticed it was not responding to any changes after restarting.  No clue why.  Anyway, I moved over to WAMP to test some more and it at least responded to configuration changes.  I tried the Ole_DB connection in the thread below and it started working perfectly. 

It must have been some part Xampp's configuration...

Share this post


Link to post
Share on other sites
So i have a doubt, is it possible to run mssql with xampp?, and if it is possible, how do you make it?

Share this post


Link to post
Share on other sites
XAMPP has three php.ini's. The correct ini you should edit is loacted in C:\[your xampp install path]\xampp\apache\bin\

When you made the changes save php.ini and restart the Apache server.

Also have a read of this FAQ from Xampps site:
[quote=http://www.apachefriends.org/en/faq-xampp-windows.html#phpini]I do not get any connection to my MS SQL server!
If the mssql extension was loaded in the php.ini, sometimes it comes to access problems when only TCP/IP is used. You can fix that problem with a newer "ntwdblib.dll" from Microsoft. Please replace the older file in the \xampp\apache\bin directory with your newer file from Microsoft. Apache restart. Thank you Horst for this topic note![/quote]

Share this post


Link to post
Share on other sites
[quote author=wildteen88 link=topic=106022.msg427769#msg427769 date=1157381952]
XAMPP has three php.ini's. The correct ini you should edit is loacted in C:\[your xampp install path]\xampp\apache\bin\

When you made the changes save php.ini and restart the Apache server.

Also have a read of this FAQ from Xampps site:
[quote=http://www.apachefriends.org/en/faq-xampp-windows.html#phpini]I do not get any connection to my MS SQL server!
If the mssql extension was loaded in the php.ini, sometimes it comes to access problems when only TCP/IP is used. You can fix that problem with a newer "ntwdblib.dll" from Microsoft. Please replace the older file in the \xampp\apache\bin directory with your newer file from Microsoft. Apache restart. Thank you Horst for this topic note![/quote]
[/quote]

Fantastic to know, and I do feel rather stupid.  I just loaded up Wamp and have been going fine.  Thanks though.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.