RE: [PHP-GENERAL] Connect to a MsSQL server from PHP on Unix?

From: Date: Thu, 22 Jun 2000 20:19:36 +0000
Subject: RE: [PHP-GENERAL] Connect to a MsSQL server from PHP on Unix?
Groups: php.general 
Request: Send a blank email to php-general+get-2701@lists.php.net to get a copy of this message
Here is a sample db connect function: // Connect to the Database if (!($link=mysql_pconnect($hostname, $username, $password))) { DisplayErrMsg(sprintf("error connecting to host %s, by user %s", $hostname, $username)) ; exit() ; } // Select the Database if (!mysql_select_db($databasename, $link)) { DisplayErrMsg(sprintf("Error in selecting %s database", $databasename)) ; DisplayErrMsg(sprintf("error:%d %s", mysql_errno($link), mysql_error($link))) ; exit() ; } I set the variables (hostname, username, etc) in a globals.php file which I require at the top of the document. -----Original Message----- From: Station1 [mailto:www@sourceclub.com] Sent: Thursday, June 22, 2000 4:14 PM To: php-general@lists.php.net Cc: armen@sourceclub.com Subject: [PHP-GENERAL] Connect to a MsSQL server from PHP on Unix? Hello, I have a Linux server, running redhat with PHP v 3.0.9 and am desperately trying to connect to a MsSQL DB on an NT Server. I've been told that there might not be a way to do it from Unix, but I'm sure there is. Can you please instruct me on how to do so? I have already tried mssql_pconnect("server:port", "user", "pw"); however I was returned the error msg: Fatal error: Call to unsupported or undefined function mssql_pconnect() in /home/eyicom/html/eyicom2/html/testmsSQL.php3 on line 10 Please assist me in this issue. Thank you. Anthony Senior Programmer

« previous php.general (#2701) next »