Page 1 of 1

PHP on win32 with IIS and MSSQL 2000

Posted: Fri Jan 10, 2003 3:57 am
by Static
I am trying to recode a web site I have from ASP to PHP. Firstly i want to get a connection to the underlying SQL database.

When executing the code below in a php script i get a message in the browser "No input file specified". I found a few topics relating to the --enable discard path etc etc but this only seems to be based on Linux systems?

<?php

$myServer = "localhost";
$myUser = "sa";
$myPass = "";
$myDB = "ooh_webcontent";

$s = @mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");

$d = @mssql_select_db($myDB, $s)
or die("Couldn't open database $myDB");

?>

Please can someone help?

Did you enable "mssql.so" or "mssql.dll"

Posted: Fri Jan 10, 2003 8:23 am
by ABoutAGirl
May be you didn't ^^

Posted: Fri Jan 10, 2003 9:18 am
by Static
I have enabled the php_mssql.dll extenstion in the php.ini file. The location of the dll file is in c:\php and that is also set as the extensions directory in the php.ini

Posted: Mon Jan 13, 2003 11:01 am
by caseymanus
The PHP mssql functions do not work with SQL Server 2000, only SQL Server 7.0 and earlier....Use the unified ODBC functions and drivers.

Posted: Mon Jan 13, 2003 2:07 pm
by glo-wurm
... or, you could try using the PEAR DB API for accessing mssql. From what I understand, the version of PEAR packaged with PHP v4.3 is considered stable on unix platforms, and in final beta stages for win32 and Darwin platforms. Give it a shot and see if it works.

here is the url to the PEAR DB API documentation:

http://pear.php.net/manual/en/core.db.php

Hope this helps :D

Thanks for all your help

Posted: Mon Jan 13, 2003 5:38 pm
by Static
I have managed to fix the problem mainly by fluke. I am now able to use the mssql function without problem. It seems to work correctly on sql2k.

Cheers,


Static :)