#27594 [Opn->Csd]: No MSSQL-functions possible when working with cursors
| From: | fmk@php.net | Date: | Mon, 15 Mar 2004 19:33:26 +0000 |
| Subject: | #27594 [Opn->Csd]: No MSSQL-functions possible when working with cursors | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-56518@lists.php.net to get a copy of this message | ||
ID: 27594
Updated by: fmk@php.net
Reported By: info at peterke dot tk
-Status: Open
+Status: Closed
Bug Type: MSSQL related
Operating System: WinXP (with and without) SP1
PHP Version: 4CVS-2004-03-15
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Computed columns does not retuen a column source
Previous Comments:
------------------------------------------------------------------------
[2004-03-15 13:09:25] info at peterke dot tk
That doesn't work either on a WinXP SP1.
I tried it on a W2k-platform too (SP4) (first situation), same result.
I connect with a MSSQL 2K.
------------------------------------------------------------------------
[2004-03-14 18:19:09] sniper@php.net
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
------------------------------------------------------------------------
[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