Can't stop sqlsrv error logging
-
Saturday, December 31, 2011 4:34 PM
Last night I enabled error logging with this:
sqlsrv_configure("LogSubsystems", SQLSRV_LOG_SYSTEM_ALL); sqlsrv_configure("LogSeverity", SQLSRV_LOG_SEVERITY_ALL); sqlsrv_configure("WarningsReturnAsErrors", 1);
And wow...my phperrs log file was filling quickly. So I used this to shut it off:
sqlsrv_configure("LogSubsystems", SQLSRV_LOG_SYSTEM_OFF); sqlsrv_configure("LogSeverity", SQLSRV_LOG_SEVERITY_ERROR); sqlsrv_configure("WarningsReturnAsErrors", 0);
And I can't stop the logging. I've added the same options to the php.ini file.
sqlsrv.WarningsReturnAsErrors = 0 sqlsrv.LogSubsystems = 0 sqlsrv.LogSeverity = 1
I'm using ADODB for PHP, version 5.14, latest version with support for the mssqlnative driver. I've restarted Apache, but every time anything accesses the SQL server, and receives an empty result set (which is supposed to happen sometimes), I get this every second:
[31-Dec-2011 09:37:41] sqlsrv_fetch_array: SQLSTATE = IMSSP [31-Dec-2011 09:37:41] sqlsrv_fetch_array: error code = -28 [31-Dec-2011 09:37:41] sqlsrv_fetch_array: message = The active result for the query contains no fields.
Sometimes, this is in there as well, but I can't find where it's being called. I've even commented out the sqlsrv_configure lines in ADODB.
[31-Dec-2011 09:37:39] sqlsrv_configure: SQLSTATE = IMSSP [31-Dec-2011 09:37:39] sqlsrv_configure: error code = -14 [31-Dec-2011 09:37:39] sqlsrv_configure: message = An invalid parameter was passed to sqlsrv_configure.
Any ideas how to stop the logging? This was not a problem with the ADODB libraries before I ran that first batch of code in a test script (which has since been changed).
All Replies
-
Saturday, December 31, 2011 4:55 PM
Well...for what its worth, I got the logging stopped.
The php.ini directives must read:
sqlsrv.WarningsReturnAsErrors = FALSE
sqlsrv.LogSubsystems = SQLSRV_LOG_SYSTEM_OFF
sqlsrv.LogSeverity = SQLSRV_LOG_SEVERITY_ERRORThe integer equivalents don't work.
Enjoy!
-
Tuesday, January 03, 2012 9:42 PMModerator
Chris-
What version of the sqlsrv driver are you using? I've been able to reproduce your results (somewhat, anyway) with the 2.0.1802.200 version. However, I'm seeing that the php.ini directive for WarningsReturnAsErrors seems to be ignored whether I use integers or otherwise.
Thaks.
-Brian
This posting is provided "AS IS" with no warranties, and confers no rights. http://blogs.msdn.com/brian_swan -
Thursday, January 05, 2012 3:38 PM
Brian,
That's the same version I'm using on Apache/2.2.21 (Win32) PHP/5.3.8 running on Windows Server 2008 R2 Datacenter.
-Chris
-
Thursday, January 05, 2012 6:37 PM
Brian
I'm sorry I have not looked up the thread ID - but the issue with the WarningsReturnAsErrors directive not working in php.ini has been reported in the forum somewhere. I think Ashay responded to it. I'll edit this post when I find it...
Edit: It was Brian who responded: here.
Rob- Edited by Robert Johnson Tuesday, January 10, 2012 11:03 AM
-
Wednesday, January 18, 2012 7:53 PM
Hi everyone,
We have noted this misbehavior and are looking to fix this in a future release.
Thanks,
Jonathan
This posting is provided 'AS IS' with no warranties, and confers no rights.- Marked As Answer by Jonathan GuerinMicrosoft Employee Wednesday, January 18, 2012 7:53 PM
-
Tuesday, November 20, 2012 7:15 AMThe current version of the driver is 3.0.1. Has this issue been fixed in this version?
-
Sunday, December 02, 2012 5:44 PM
Hi luisdv,
Not yet.
Thanks,
Jonathan
This posting is provided 'AS IS' with no warranties, and confers no rights.

