Jump to content

XAMPP and MS SQL 2005 Express


argoSquirrel

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.
Link to comment
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...
Link to comment
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]
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.