ID: 35839 Updated by: [EMAIL PROTECTED] Reported By: muratyaman at gmail dot com Status: Feedback Bug Type: MSSQL related Operating System: Win XP Pro SP2 PHP Version: 5.1.1 New Comment:
Can you reproduce the error with out the DB abstraction layer you are using? The data send to the server contains garbage, and this could be an indication that you are getting this error in a multithreaded environment. The standard MSSQL extension is not thread safe du to the msdblib library used to build the extension. You could replace php_mssql.dll with php_dblib.dll. It provides the same functions but uses FreeTDS to create conenctions. Previous Comments: ------------------------------------------------------------------------ [2005-12-29 16:37:20] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip ------------------------------------------------------------------------ [2005-12-29 16:33:49] muratyaman at gmail dot com 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 this bug report at http://bugs.php.net/?id=35839&edit=1