Page 1 of 1

(help)Call to undefined function mssql_connect()

PostPosted: 19. April 2012 20:11
by rynokabbage
Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\index.php on line 37

hello. i had downloaded Xampp because i kept getthing this error on wamp. so i install xampp and get this same error.
i am trying to connect to my sql 2005 database using php. the code is 100% correct.
i have enabled the sql extensions yet i still get this error.

this have been driving me crazy for days now.
someone had told me to download and install sqlsrv30.exe but this did not work either.
someone had also said to place ntwdblib.dll in the apache and php files but this also did not solve my problem.

if anyone can help me out i would greatly appreciate it.
im new to xampp so a step by step guide would be very helpful
thank you.

Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\index.php on line 37

Re: (help)Call to undefined function mssql_connect()

PostPosted: 19. April 2012 20:25
by Altrea
Hi rynokabbage,

The mssql extension is not implemented with the current version of XAMPP.
You can use sqlsrv instead like described in this thread: viewtopic.php?f=16&t=50125&p=193284&hilit=sqlsrv#p193284

But to get this working, you have to change your script sourcecode too, because the functions are named different. e.g.: http://www.php.net/manual/en/function.s ... onnect.php

best wishes,
Altrea

Re: (help)Call to undefined function mssql_connect()

PostPosted: 20. April 2012 00:28
by rynokabbage
yeah i tried all of that already. , many times also changes the function name to and from sql_connect and sqlsrv_connect. im about to rip my hair out on this one.

if anyone out there has successfuly connected to sql 2005, using 2012 native client, php 5.3.8, apache 2.2.21 and xampp or wamp. i would love a step by step guild that it very detailed. im new to setting up all this stuff an would love some help.