ID: 27594 Updated by: [EMAIL PROTECTED] Reported By: info at peterke dot tk -Status: Open +Status: Feedback Bug Type: MSSQL related Operating System: WinXP (with and without) SP1 PHP Version: 4.3.4 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Previous Comments: ------------------------------------------------------------------------ [2004-03-14 06:37:27] info at peterke dot tk Description: ------------ PHP seems to crash Apache 2 webserver when working with MSSQL-functions and a MSSQL-CURSOR (I tried it without a MSSQL-function and that worked perfect, I tried working with MSSQL-functions without a CURSOR, and that worked perfect too). There are no traces of the crashing, only a windows dialogbox and an error in the apache error.log changes in php.ini: error_reporting = E_ALL display_startup_errors = On log_errors = On error_log = D:/www/error.log doc_root = d:/www extension=php_mssql.dll mssql.datetimeconvert = Off (php runs as a module) Reproduce code: --------------- $Link = mssql_connect("localhost","user","password"); mssql_select_db("database", $Link); $Query = "DECLARE tmpCursor CURSOR SCROLL FOR SELECT CAST(myField AS VARCHAR) FROM myTable OPEN tmpCursor FETCH LAST FROM tmpCursor CLOSE tmpCursor DEALLOCATE tmpCursor"; $Result = mssql_query($Query, $Link); while (mssql_next_result($Result) == TRUE) { $row = mssql_fetch_row($Result); print_r($row); } mssql_free_result($Result); mssql_close($Link); Expected result: ---------------- the last element from a cursor (in this case casted to a varchar, but other functions like 'ROUND()' don't seem to work either) Actual result: -------------- Apache crashes with 'The instruction on 0x006f7e9e points to memory on 0x00000000. The read or write-instruction ("read") on the memory failed.' in a windows dialog box. In the error.log (apache) is stated: [Sun Mar 14 11:42:31 2004] [notice] Parent: child process exited with status 3221225477 -- Restarting. [Sun Mar 14 11:42:31 2004] [notice] Parent: Created child process 1640 [Sun Mar 14 11:42:31 2004] [notice] Child 1640: Child process is running [Sun Mar 14 11:42:31 2004] [notice] Child 1640: Acquired the start mutex. [Sun Mar 14 11:42:32 2004] [notice] Child 1640: Starting 250 worker threads. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27594&edit=1