I love PHP, but I am forced to us MS products at work. As such we have a dedicated MS SQL Server 2000 box that i must work with. I have a database that i connect to using the following PHP code:
$server = "Server IP,PORT";
$user_name = "server username";
$password = "pass";
$database = "dbname";
if(!($sql_connect =mssql_connect($server,$user_name,$password)))
die ("Could not connect to:<b> $server</b>");
mssql_select_db($database) or DIE("database:$database is not unavailable");
//end//
which actually gets me connected, but it takes for ever to run even the simplest query. However, when i do the same query in ASP the connection flys. The server the script is on is hosted on a IIS box and I am using the ISAPI filter for IIS and I run PHP 4.2. I have all of the MS SQL server files installed on the dedicated box from the CD.
again the connection works but takes forever to connect. I have tried the connection above as well as an ODBC connection, and it still takes twice as long as ASP.
Is there any way to speed things up?
Thanks,
RD