Bug #10114 Updated: Error reading LONG fields (ntext) in MSSQL (SQL Server) (bug #5237)

From: Date: Wed, 23 Jan 2002 11:34:42 +0000
Subject: Bug #10114 Updated: Error reading LONG fields (ntext) in MSSQL (SQL Server) (bug #5237)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-77884@lists.php.net to get a copy of this message
ID: 10114 Comment by: walter@sys-net.it Old Reported By: bonwon@dowebwedo.com Reported By: walter@sys-net.it Status: Open Bug Type: ODBC related Operating System: Linux (Debian) 2.2.12 PHP Version: 4.0.4pl1 New Comment: This bug should be closed. If I'm not wrong this problem is due to emalloc tring to allocate to much memory and exiting on failure. I have sent a patch to fix this problem some time ago. The patch is applied as of 4.0.7 (or 4.0.6) and the problem does not show up again (at least with Solid). Previous Comments: ------------------------------------------------------------------------ [2001-05-14 08:27:01] bonwon@dowebwedo.com Oops... todo got lost, but got it now =) (gdb) run -X Starting program: /www/bin/httpd -X [New Thread 1024 (runnable)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1024 (runnable)] 0x401b4921 in kill () from /lib/libc.so.6 (gdb) bt #0 0x401b4921 in kill () from /lib/libc.so.6 #1 0x81027f7 in _emalloc () #2 0x80966ce in odbc_bindcols () #3 0x8097fdf in php_if_odbc_exec () #4 0x814c0fa in execute () #5 0x8113b34 in zend_execute_scripts () #6 0x807fa8f in php_execute_script () #7 0x812406c in apache_php_module_main () #8 0x807c916 in send_php () #9 0x807c94a in send_parsed_php () #10 0x8156a89 in ap_invoke_handler () #11 0x816b3df in ap_some_auth_required () #12 0x816b446 in ap_process_request () #13 0x8162366 in ap_child_terminate () #14 0x8162521 in ap_child_terminate () #15 0x816269c in ap_child_terminate () #16 0x8162d0c in ap_child_terminate () #17 0x816353c in main () #18 0x401aea42 in __libc_start_main () from /lib/libc.so.6 PHP-code is --- CODESNIPPET::BEGIN --- <hr> <?php $db = odbc_connect('mydb', '', ''); $query = "SELECT * FROM tbl_test"; $result = odbc_do($db, $query); while(odbc_fetch_row($result)) { $cnt_row++; print "Got row $cnt_row<br>\n"; } ?> <hr> --- CODESNIPPET::END --- --- TABLEDEFINITION::BEGIN-- CREATE TABLE [dbo].[tbl_test] ( [id] [int] IDENTITY (1, 1) NOT NULL , [name] [char] (10) NULL , [text] [ntext] NULL ) GO --- TABLEDEFINITION::END-- ------------------------------------------------------------------------ [2001-05-08 10:58:46] kalowsky@php.net moving this from 'feedbac' to 'open' as user responded last.. back trace ready yet? :) ------------------------------------------------------------------------ [2001-04-19 09:23:51] bonwon@dowebwedo.com Will do so, within a week from now I'll post the result. ------------------------------------------------------------------------ [2001-04-19 08:58:10] kalowsky@php.net build php with --enable-debug and recreate the backtrace please.. ------------------------------------------------------------------------ [2001-04-02 09:22:07] bonwon@dowebwedo.com _Reopening the case of bug 5237_ A field defined in a MSSQL-table as "ntext" crashes PHP when a query (including the ntext-field in the resultset) is preprared/executed. This behaviour still exists in the PHP-version 4.0.4pl1. Feel free to contact me for more information or tests. _gdb backtrace_ (gdb) run -X Starting program: /www/bin/httpd -X [New Thread 1024 (runnable)] Program exited with code 01. (gdb) bt No stack. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=10114&edit=1

« previous php.dev (#77884) next »