note 106954 added to function.mssql-query
| From: | Haprog at osu1 dot php dot net | Date: | Tue, 20 Dec 2011 16:10:49 +0000 |
| Subject: | note 106954 added to function.mssql-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-185183@lists.php.net to get a copy of this message | ||
In some cases when mssql_query() returns rows containing fields of type SMALLDATETIME or TIMESTAMP
when the data is not NULL, PHP seems to enter some kind of error state where PHP no longer outputs
anything to the browser. Not even data echoed before the query! DATETIME fields seem to work without
this problem though.
When this happens, PHP doesn't give any errors even with error_reporting(-1), and no errors
appear in Apache logfiles either.
There seems to be a workaround by explicitly calling flush() at the end of the skript.
In my case the problem occurred only when using some basic comparison operators for integer or
string fields in a WHERE clause (eg. "WHERE id = 1000").
I discovered this behaviour on Ubuntu 11.10 (Linux 3.0.0-13-generic-pae), Apache 2.2.20, PHP
5.3.6-13ubuntu3.3 with Suhosin-Patch as Apache module, php5-mssql package using freetds
----
Server IP: 62.237.7.3
Probable Submitter: 91.153.91.126
----
Manual Page -- http://www.php.net/manual/en/function.mssql-query.php
Edit -- https://master.php.net/note/edit/106954
Del: integrated -- https://master.php.net/note/delete/106954/integrated
Del: useless -- https://master.php.net/note/delete/106954/useless
Del: bad code -- https://master.php.net/note/delete/106954/bad+code
Del: spam -- https://master.php.net/note/delete/106954/spam
Del: non-english -- https://master.php.net/note/delete/106954/non-english
Del: in docs -- https://master.php.net/note/delete/106954/in+docs
Del: other reasons-- https://master.php.net/note/delete/106954
Reject -- https://master.php.net/note/reject/106954
Search -- https://master.php.net/manage/user-notes.php