FallenHobo Posted May 27, 2012 Share Posted May 27, 2012 Hello everyone, im semi new to php, i ran into a problem and can't seem to figure it out. I'm getting a "Fatal error: Call to undefined function mssql_connect()" heres the code minus the UID,PW ofcourse. <?php $server = '127.0.0.1'; // Connect to MSSQL $link = mssql_connect($server, '****', '*****'); <---ID,PW taken out(derp lol) if (!$link) { die('Something went wrong while connecting to MSSQL'); } ?> I have tried it many different ways, DELL-PC\127 etc etc. any input on this would would be wonderfull. Quote Link to comment https://forums.phpfreaks.com/topic/263237-fatal-error/ Share on other sites More sharing options...
Psycho Posted May 27, 2012 Share Posted May 27, 2012 http://www.php.net/manual/en/intro.mssql.php This extension is not available anymore on Windows with PHP 5.3 or later.7 SQLSRV, an alternative driver for MS SQL is available from Microsoft: » http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx. Quote Link to comment https://forums.phpfreaks.com/topic/263237-fatal-error/#findComment-1349077 Share on other sites More sharing options...
FallenHobo Posted May 28, 2012 Author Share Posted May 28, 2012 http://www.php.net/manual/en/intro.mssql.php This extension is not available anymore on Windows with PHP 5.3 or later.7 SQLSRV, an alternative driver for MS SQL is available from Microsoft: » http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx. Thanks for you help but this still did not fix the error. Here's a bit more info on this i'm trying to connect to my SQL 08 default instance from my registration script, x10 hosting is the host we are using for now, all extensions are there and enabled, i'm running php6 on apache2.2 from appserv. Quote Link to comment https://forums.phpfreaks.com/topic/263237-fatal-error/#findComment-1349081 Share on other sites More sharing options...
kicken Posted May 28, 2012 Share Posted May 28, 2012 i'm running php6 There is no PHP 6. As mentioned the MS-SQL extension is no longer available so you cannot use it. If you need to connect to a SQL Server database you need to use ither the SQLSRV extension from microsoft or the ODBC extension. You'll want to create a page consisting of: <?php phpinfo(); ?> and load that page on your host to see which functions and extensions are available to you. Quote Link to comment https://forums.phpfreaks.com/topic/263237-fatal-error/#findComment-1349093 Share on other sites More sharing options...
FallenHobo Posted May 28, 2012 Author Share Posted May 28, 2012 i'm running php6 There is no PHP 6. As mentioned the MS-SQL extension is no longer available so you cannot use it. If you need to connect to a SQL Server database you need to use ither the SQLSRV extension from microsoft or the ODBC extension. You'll want to create a page consisting of: <?php phpinfo(); ?> and load that page on your host to see which functions and extensions are available to you. There is no PHP 6. there's no php6? look at attached pic, also all my sqlsrv extentions are enabled. Quote Link to comment https://forums.phpfreaks.com/topic/263237-fatal-error/#findComment-1349100 Share on other sites More sharing options...
jcbones Posted May 28, 2012 Share Posted May 28, 2012 Yes, there is no PHP6. Quote Link to comment https://forums.phpfreaks.com/topic/263237-fatal-error/#findComment-1349102 Share on other sites More sharing options...
FallenHobo Posted May 28, 2012 Author Share Posted May 28, 2012 Yes, there is no PHP6. Welp whatever i think i solved my own problem, won't be coming back to this site again, people here are assholes, peace. Quote Link to comment https://forums.phpfreaks.com/topic/263237-fatal-error/#findComment-1349106 Share on other sites More sharing options...
Pikachu2000 Posted May 30, 2012 Share Posted May 30, 2012 You mad, bro? I don't see where anyone here was an asshole. You just got all butthurt because you were called out on there being no PHP6, that's all. Quote Link to comment https://forums.phpfreaks.com/topic/263237-fatal-error/#findComment-1349687 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.