I have a PHP webpage that calls a MS SQL 2005 Stored Procedure on server1.
Everything works fine until the stored procedure tries to get information from a different linked server.
Then the page stops, the procedure stops and nothing is returned….no errors no nothing. The Stored Procedure can be as simple as the following select statement…
SELECT ITEMNAME FROM SERVER2.DBO.ITEMS
The procedure runs correctly in SQL on both servers with the same credentials as I’m using in PHP.
Thanks in advance for the help!
I found the answer to my problem on the following site
http://bomforcastprep/index.php
I had to add the following two lines of PHP right before I execute the stored procedure…
$result = mssql_query(“SET ANSI_NULLS ON”) or die(mssql_get_last_message());
$result = mssql_query(“SET ANSI_WARNINGS ON”) or die(mssql_get_last_message());