tamilmani Posted April 29, 2010 Share Posted April 29, 2010 Hi All, I have faced one issue in php . I need to connect the SQL server using php code . My sample code is <?php $myServer = "localhost"; $myUser = "username"; $myPass = "psssword"; $myDB = "my_db"; //connection to the database $dbhandle = mssql_connect($myServer, $myUser, $myPass) or die("Couldn't connect to SQL Server on $myServer"); //select a database to work with $selected = mssql_select_db($myDB, $dbhandle) or die("Couldn't open database $myDB"); ?> If i run the above code , i am getting error message Fatal error: Call to undefined function mssql_connect() in C:\wamp\www\mssql.php on line 8 Step are dones 1. uncommented the extension=php_mssql.dll line in php.ini 2. Loaded the newtlib.dll file But still i am getting error message. Thanks Tamilmani Mohan Link to comment https://forums.phpfreaks.com/topic/200141-php-mssql-connection/ Share on other sites More sharing options...
siric Posted April 29, 2010 Share Posted April 29, 2010 Have you stopped and restarted the webserver after you made the change in the php.ini file? Link to comment https://forums.phpfreaks.com/topic/200141-php-mssql-connection/#findComment-1050478 Share on other sites More sharing options...
tamilmani Posted April 29, 2010 Author Share Posted April 29, 2010 Yes i have restarted my web server . But there is no use . Ï am getting same error message Link to comment https://forums.phpfreaks.com/topic/200141-php-mssql-connection/#findComment-1050484 Share on other sites More sharing options...
siric Posted April 29, 2010 Share Posted April 29, 2010 Run a phpinfo script to ensure that the mssql is showing up as being loaded <?php phiinfo(); ?> Link to comment https://forums.phpfreaks.com/topic/200141-php-mssql-connection/#findComment-1050560 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.