Server : sql 2000 sp2 in SQL authentication mode If I run c:\php\php.exe test1.php it produces the correct html output displaying the rows. Which means SQL is functioning with the username/pw configuration in the php code. But if called THRU Internet Service manager, the exact same test1.php file, I get this:
PHP Warning: MS SQL message: Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in c:\websites1\killer5.nextmill.net\test1.php on line 36 PHP Warning: MS SQL: Unable to connect to server: killer6.nextmill.net,1433 in c:\websites1\killer5.nextmill.net\test1.php on line 36 PHP Warning: Supplied argument is not a valid MS SQL-Link resource in c:\websites1\killer5.nextmill.net\test1.php on line 37 PHP Warning: Supplied argument is not a valid MS SQL-Link resource in c:\websites1\killer5.nextmill.net\test1.php on line 38 PHP Warning: Supplied argument is not a valid MS SQL-result resource in c:\websites1\killer5.nextmill.net\test1.php on line 39 PHP Warning: Supplied argument is not a valid MS SQL-result resource in c:\websites1\killer5.nextmill.net\test1.php on line 60 The code is below: $db = mssql_connect("killer6.nextmill.net,1433", "sa", "*******"); (removed for security) mssql_select_db("EDSLdbase",$db); $result = mssql_query("SELECT * FROM test",$db); $total = mssql_num_rows($result); ?>Total number of entries in database:<b> <?php echo $total; printf("%s,%s-%s-%s,%s,%s\n<br>", $myrow[0], $myrow[1], $myrow[2], $myrow[3], $myrow[4], $myrow[5]); ________________________________ What is weird is it works in a CMD prompt, but if called thru IIS 5, it displays the error running PHP 4.1.2, if I use PHP 4.2.1, I get no error but no display of the content either. This WAS working on 4.0.4 before the server was upgraded to 4.2.1 and then tested on another server using 4.1.2 Any ideas? BTW, this sql server is configured to only allow TCPIP connections, no named pipes, but that hasn't been an issue with the 4.0.4 config in the past. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php