ID: 34784 Comment by: chrisgenrich at bmminvestments dot com Reported By: jwall at webpeak dot com Status: Assigned Bug Type: MSSQL related Operating System: Windows XP PHP Version: 5CVS-2005-10-08 (snap) Assigned To: fmk New Comment:
I was getting this error with a long running query and modified the php.ini to the following: ; Minimum error severity to display. mssql.min_error_severity = 0 ; Minimum message severity to display. mssql.min_message_severity = 17 It's possible that lower settings could work as well... Previous Comments: ------------------------------------------------------------------------ [2009-03-10 14:00:48] markus_hay at quantumdigital dot com This bug has not been fixed and it's driving me absolutely nuts as I can not seem to reproduce it in a non-production environment to find a workaround. It happens on UPDATEs, INSERTs, SELECTs, etc., and it's completely random. I don't know if it's a PHP issue or a PEAR issue, but as of PHP 5.2.5 and PEAR 1.7.2 the so-called informative message of "Changed database context to ..." is still appearing. OS is Windows Server 2k3 and database is MS SQL Server 2005. The following settings are used in php.ini: =========================================== mssql.min_error_severity = 10 mssql.min_message_severity = 10 Here is some example code: ========================== $sSql = 'UPDATE Table SET iNumber = 5 WHERE iRecordId = 666'; if (PEAR::isError($oResults = $rDbConn->query($sSql))) { die($oResults->getMessage()); } Typical output would be: ======================== [Native code: 0] [Native message: Changed database context to 'TableName'.] Is this ever going to get fixed? ------------------------------------------------------------------------ [2008-03-06 18:45:55] arn_schw at yahoo dot com Hi , I've written this code to use the data stored in the data-base named moviesite. The result is supposed to print the names of three different movies each one time.But,I get each 51 times I couldn't get where the error is present.So,please help me in rectifying my mistake...... <?php //connecting to mysql $connect = mysql_connect ( "localhost" , "root" , "") or die ( " You can't be connected to the server " ) ; mysql_select_db (moviesite) ; $result = "SELECT movie_name , movie_year " . "FROM movie " . "WHERE movie_year > 1900 " . "ORDER BY movie_name " ; $res = mysql_query ( $result ) or die ( mysql_error ( ) ) ; $st = 0 ; while( $ress = mysql_fetch_assoc ( $res ) ) { extract ( $ress ) ; echo "$movie_name" ; echo "<br>" ; $st = $st+1 ; } echo "Finally the number of times it is printed is....".$st ; ?> ------------------------------------------------------------------------ [2007-09-05 17:18:22] php at blazemonger dot com I am seeing this error on *every* MSSQL query under PHP 5.2.2, on Windows 2003 Server x64, in the apache 2.2.4 error log file. ------------------------------------------------------------------------ [2007-07-03 23:39:38] vollmer at ampache dot org I'm running into this same issue with large result sets. I am running a Debian ETCH server with Apache2/PHP5.2 dpkg --list | grep "php" ii libapache2-mod-php5 5.2.0-8+etch4 server-side, HTML-embedded scripting languag ii php-pear 5.2.0-8+etch4 PEAR - PHP Extension and Application Reposit ii php5-cli 5.2.0-8+etch4 command-line interpreter for the php5 script ii php5-common 5.2.0-8+etch4 Common files for packages built from the php ii php5-curl 5.2.0-8+etch4 CURL module for php5 ii php5-gd 5.2.0-8+etch4 GD module for php5 ii php5-ldap 5.2.0-8+etch4 LDAP module for php5 ii php5-mcrypt 5.2.0-8+etch4 MCrypt module for php5 ii php5-mysql 5.2.0-8+etch4 MySQL module for php5 ii php5-snmp 5.2.0-8+etch4 SNMP module for php5 ii php5-sybase 5.2.0-8+etch4 Sybase / MS SQL Server module for php5 The exact error I am seeing is Query: SELECT * FROM L_U_t_State WHERE Status='1' (51 Rows returned) Error: Changed database context to 'RMS'. Complexity or speed of query doesn't appear to matter, my larger multi-table selects/joins/unions do not produce the same error. PHP Code that is producing the error message <?php /* Run the query*/ $result = mssql_fetch_assoc($result_resource); if (!$result) { debug_event('num_rows','Failed: ' . $sql . mssql_get_last_message(),'1'); } ?> -Karl Vollmer ------------------------------------------------------------------------ [2006-08-07 20:25:47] haunw at spcollege dot edu I have this same issue on PHP 4.3.11(running as CGI) on Windows2000 server. Happens intermittently. Only pattern seems to be that it is when SQL Server is running a bit slower. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/34784 -- Edit this bug report at http://bugs.php.net/?id=34784&edit=1