|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-06-11 14:14 UTC] alexander dot merz at gmail dot com
Description:
------------
Running the current PEAR::MDB2 testsuite in CVS against MS SQLServer 2005 Beta causes a crash of php.
The source causing the crash reduced to a minimum is given in the "Reproduced code" section.
The crash does also happend if you list the field names directly:
'SELECT user_name, user_password, subscribed, user_id, quota, weight, access_date, access_time, approved FROM users'
It does crash too, if the statment above contains only the first two fields (user_name, user_password) and *one* of the others, ie:
'SELECT user_name, user_password, subscribed FROM users'
It *works*, if the field list does NOT contain the user_password field, independed of length of the field list, ie:
'SELECT user_name, subscribed, user_id, quota, weight, access_date, access_time, approved FROM users'
user_password is of the type 'text'.
The table is empty, and the statement works like a charm in the SQL Query console of Server Management Studio.
Reproduce code:
---------------
$c = mssql_connect("ALEX", "amerz", "amerz");
mssql_select_db("driver_test", $c);
mssql_query('SELECT * FROM users');
mssql_close($c);
Expected result:
----------------
No crash :)
Actual result:
--------------
a crash :(
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 14:00:01 2025 UTC |
I would agree, but a much more complex java app works perfectly on the beta using a jdbc driver older then the beta version! I will test it with a newer version of php next monday. But, this seems to be definitly a bug in the php extension, especialy how it fetches the result set. I made some further tests. I create a test table containing one record and run the small script again: $c = mssql_connect("ALEX", "amerz", "amerz"); mssql_select_db("text_test", $c); var_dump(mssql_query('SELECT text1, text2 FROM texttable', $c)); mssql_close($c); The result: It prints resource(5) of type (mssql result) and then php crashes...