Jump to content

Fatal Error


FallenHobo

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

post-134229-13482403551716_thumb.jpg

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.