Jump to content


Photo

XAMPP and MS SQL 2005 Express


  • Please log in to reply
6 replies to this topic

#1 argoSquirrel

argoSquirrel
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 29 August 2006 - 02:29 AM

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.

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 29 August 2006 - 09:05 AM

If you installed mssql did you enable the php_mssql.dll extension in the php.ini?

#3 argoSquirrel

argoSquirrel
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 30 August 2006 - 07:27 PM

If you installed mssql did you enable the php_mssql.dll extension in the php.ini?

Yes, all extensions are turned on in php.ini.

#4 argoSquirrel

argoSquirrel
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 31 August 2006 - 12:08 AM

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...

#5 gabo0303

gabo0303
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 04 September 2006 - 02:07 PM

So i have a doubt, is it possible to run mssql with xampp?, and if it is possible, how do you make it?

#6 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 04 September 2006 - 02:59 PM

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:

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!



#7 argoSquirrel

argoSquirrel
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 05 September 2006 - 03:17 AM

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:

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!


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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users