ID: 26589 User updated by: justin22 at v-biz dot net Reported By: justin22 at v-biz dot net -Status: Feedback +Status: Open Bug Type: MSSQL related Operating System: windows 2000 PHP Version: 4CVS, 5CVS New Comment:
running it from the command line ('php moneytest.php') also crashes: dr watson: function: RtlAllocateHeap 77fcc4c9 897dcc mov [ebp+0xcc],edi ss:0154958a=???????? 77fcc4cc 884705 mov [edi+0x5],al ds:020da096=?? 77fcc4cf 66894f02 mov [edi+0x2],cx ds:020da097=???? 77fcc4d3 8a4e04 mov cl,[esi+0x4] ds:020da076=?? 77fcc4d6 884f04 mov [edi+0x4],cl ds:020da096=?? 77fcc4d9 66891f mov [edi],bx ds:00cc01b0=2e6c 77fcc4dc a810 test al,0x10 77fcc4de 0f8540020000 jne RtlAllocateHeap+0x477 (77fcc724) 77fcc4e4 8d0cdf lea ecx,[edi+ebx*8] ds:00002e6c=???????? 77fcc4e7 894dd0 mov [ebp+0xd0],ecx ss:0154958a=???????? FAULT ->77fcc4ea 8a4105 mov al,[ecx+0x5] ds:020f13f6=?? 77fcc4ed a801 test al,0x1 77fcc4ef 0f8419ebffff je _eFSQRT+0xd44 (77fcb00e) 77fcc4f5 66895902 mov [ecx+0x2],bx ds:020f13f7=???? 77fcc4f9 6681fb8000 cmp bx,0x80 77fcc4fe 0f8391f4ffff jnb RtlSizeHeap+0x8f (77fcb995) 77fcc504 80670510 and byte ptr [edi+0x5],0x10 ds:020da096=?? 77fcc508 0fb7c3 movzx eax,bx 77fcc50b 8b4da4 mov ecx,[ebp+0xa4] ss:0154958a=???????? 77fcc50e 8db4c178010000 lea esi,[ecx+eax*8+0x178] ds:000006e6=???????? 77fcc515 89b500ffffff mov [ebp+0xffffff00],esi ss:0012f5a4=00000000 77fcc51b 3936 cmp [esi],esi ds:00cc0190=00cc0004 *----> Stack Back Trace <----* FramePtr ReturnAd Param#1 Param#2 Param#3 Param#4 Function Name 0012F6A4 100BFE82 00CC0000 00000001 00000018 00000001 ntdll!RtlAllocateHeap 00000005 00000000 00000000 00000000 00000000 00000000 !emalloc Previous Comments: ------------------------------------------------------------------------ [2004-02-17 17:34:56] [EMAIL PROTECTED] Does it crash if you run it from command line using CLI / CGI binary? ------------------------------------------------------------------------ [2003-12-14 20:28:51] justin22 at v-biz dot net I've created a sample database with my table, along with this script: <? echo "Connect to server<br>"; $ConnID = mssql_pconnect('justin', 'xxx', 'ppp'); if ($ConnID===false) die("Cannot connect to server"); echo "select Database<br>"; if (!mssql_select_db('PhpMoneyTest')) die('cannot select db PHPmoneytest'); $sql="select amount as amount from Test"; $result = mssql_query($sql); // php crashes here echo "Test Passed" // Finished ?> php.ini settings are: [MSSQL] ; Allow or prevent persistent links. mssql.allow_persistent = on ; Maximum number of persistent links. -1 means no limit. mssql.max_persistent = -1 ; Maximum number of links (persistent+non persistent). -1 means no limit. mssql.max_links = -1 ; Minimum error severity to display. mssql.min_error_severity = 10 ; Minimum message severity to display. mssql.min_message_severity = 10 ; Compatability mode with old versions of PHP 3.0. mssql.compatability_mode = Off ; Valid range 0 - 2147483647. Default = 4096. ;[jvp] allow more text! mssql.textlimit = 16384 ; Valid range 0 - 2147483647. Default = 4096. ;[jvp] mssql.textsize = 16384 ; Limits the number of records in each batch. 0 = all records in one batch. mssql.batchsize = 0 ; Use NT authentication when connecting to the server mssql.secure_connection = 0 ; Specify max number of processes. Default = 25 ;mssql.max_procs = 25 ; Disable date time conversions: dates formatted yyyy-mm-dd hh:mm:ssAA mssql.datetimeconvert = 0 I tried changing some of these (in particular, tried without persistent connections) without any effect. I'm using apache module, but this dies with only a single process (request), so its unlikely to be a thread issue. I'm very concerned about your threadsafe comments - can you point me to any discussion of this issue? sample db with table 'Test' emailed as requested. Thanks for your quick response! Justin ------------------------------------------------------------------------ [2003-12-12 01:02:00] [EMAIL PROTECTED] I've tested this with the latest code from CVS of both php4 and php5 and I can't reproduce it. Please provide some more details like php.ini settings for mssql and are you using CGI or apache module ? The Microsoft library used for the mssql extension is not thread safe. That could be the problem if you are using apache module. You can send your sample code and data to [EMAIL PROTECTED] ------------------------------------------------------------------------ [2003-12-11 21:41:47] justin22 at v-biz dot net Tried latest CVS, exact same result. Could be same problem as reported in bug #19588, as I tried to do a convert(smallmoney, amount) instead of float conversion and it still failed. ------------------------------------------------------------------------ [2003-12-11 06:34:32] [EMAIL PROTECTED] 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 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/26589 -- Edit this bug report at http://bugs.php.net/?id=26589&edit=1