When a message, e.g. from a SQL 'print' statement is executed, the sqlsrv driver forwards it through sqlsrv_errors().
The default setting is to treat all warnings as errors, so your query will fail...
Set the feature to treat warning as errors to false like this, so that the messages will not fail your query:
sqlsrv_configure('WarningsReturnAsErrors',0);
Also, don't forget to call sqlsrv_next_result($yourStmt); to scroll through all of the warnings and results. When sqlsrv_next_result() returns NULL, you have reached the end of all results without any errors.