i have recently started getting generic errors with the sqlsrv php mssql plugin. i have been using it for a while now and have had no problems. recently I moved my entire site/ databases to a new server, moss 2010, mssql 2008. with the sqlsrv plugin you can access sql2008 from php. i have always used the code
$retval = runQuery($conn,$tsql);
$myErrors = json_encode(array("status"=>"Failed","step"=>"Update tools","errors"=>json_encode(sqlsrv_errors())));
to run the sql statment and check to see if there were any errors. this used to return the actualy SQL error returned from MSSql 2008. since we have moved to the new server i have been getting a generic error that makes no sense.
the error we have been getting is
message:An invalid parameter was passed to sqlsrv_free_stmt.
I get this error from sqlsrv no matter the SQL error. i am trying to see if the person adding the record will hit a Key contraint but i cannot tell what the error was with this. i get this error wether i use sqlsrv_free_stmt or not. i get it even if i remove all instances of sqlsrv_free_stmt from my php code.
i have done alot of searching on this and can find many examples of "An invalid parameter was passed to " but the are always to other functions. never to sqlsrv_free_stmt