From: muratyaman at gmail dot com Operating system: Win XP Pro SP2 PHP version: 5.1.1 PHP Bug Type: MSSQL related Bug description: mssql_query Possible network error Bad token from SQL Server..
Description: ------------ Error message is: "mssql_query() [function.mssql-query]: Possible network error: Bad token from SQL Server: Datastream processing out of sync. (severity 9) in file ... line ..." I have a WinXP, Apache2, PHP5, MSDE2000 app and many pages inserting, updating, deleting records.. Pages for inserts include code to return on error and not lose entered data. Reproduce code: --------------- (Every page opens connection, queries database multiple times, closes the connection.) Create a form with a few textboxes and a combobox. I create a combobox with: <? $selected_option = 0; echo db_combo('field1', 'select field1 from tbl1', $selected_option); ?> db_combo simply uses mssql_query to select records from a table, fill with options, create HTML code of a combobox with <select> <option></option> </select> I use a global $dbh to handle database connection, also use mssql_connect, mssql_select_db functions. Expected result: ---------------- 1. load page: tbl2_new.php combobox FULL with records read from the table 2. post to : tbl2_insert.php may not insert record because of normal reasons 3. return to: tbl2_new.php any entered data is post back combobox FULL with records read from the table 4. post to : tbl2_insert.php insert record Actual result: -------------- 1. load page: tbl2_new.php with EMPTY combobox and ERROR connection is lost every call afterwards to mssql_query fails 2. post to : tbl2_insert.php may or may not insert record 3. return to: tbl2_new.php any entered data is post back combobox FULL with records read from the table no problem at all Briefly, "new" and "edit" pages are very much similar with comboboxes etc. But on "new" pages, combobox cannot get any records on 1st run. I could not figure out the problem. But I think there is a communication problem when SQL server tries to send the records from a table. Thanks in advance. -- Edit bug report at http://bugs.php.net/?id=35839&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35839&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35839&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35839&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35839&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35839&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35839&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35839&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35839&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35839&r=support Expected behavior: http://bugs.php.net/fix.php?id=35839&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35839&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35839&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35839&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35839&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35839&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35839&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35839&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35839&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35839&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35839&r=mysqlcfg