veedub Posted June 7, 2007 Share Posted June 7, 2007 Hello, I have a server, which i can ping and is on the network, with an sql database on it which i'm trying to connect to. the server i'm initially on is an Apache with only php 5 on it. do i need to enable or install anything on the PHP 5 server to recognise the mssql functions? any help would be really appreciated. to connect to the sql database i'm using the code below: firstly the script errors saying: fatal error: call to undefined function mssql_connect()............... if (function_exists('mssql_connect')) {echo "yes";} else {echo "no";} $myServer = "10.16......"; $myUser = "********"; $myPass = "********"; $myDB = "Pod1View"; // connect $cs = mssql_connect ( '*********', '********', '********' ) or die ( 'Can not connect to server' ); // select mssql_select_db ( '[Pod1View]', $cs ) or die ( 'Can not select database' ); //query $sql = "SELECT * FROM [bRANCH]"; $r = mssql_query ( $sql, $cs ) or die ( 'Query Error' ); // loop the result while ( $row = mssql_fetch_array ( $r ) ) { /* do stuff */ } Link to comment https://forums.phpfreaks.com/topic/54615-php-5-server-connecting-to-a-2000-server-with-a-sql-database/ Share on other sites More sharing options...
ober Posted June 9, 2007 Share Posted June 9, 2007 You must enable the mssql library in php.ini and there are a few other configurations to do as well depending on your OS. http://www.php.net/manual/en/ref.mssql.php Link to comment https://forums.phpfreaks.com/topic/54615-php-5-server-connecting-to-a-2000-server-with-a-sql-database/#findComment-271517 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.