ID: 10114
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: ODBC related
Operating system: Linux (Debian) 2.2.12
PHP Version: 4.0.4pl1
Description: Error reading LONG fields (ntext) in MSSQL (SQL Server) (bug #5237)

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--

Previous Comments:
---------------------------------------------------------------------------

[2001-05-08 10:58:46] [EMAIL PROTECTED]
moving this from 'feedbac' to 'open' as user responded last..  back trace ready yet? :)

---------------------------------------------------------------------------

[2001-04-19 09:23:51] [EMAIL PROTECTED]
Will do so,
within a week from now I'll post the result.

---------------------------------------------------------------------------

[2001-04-19 08:58:10] [EMAIL PROTECTED]
build php with --enable-debug and recreate the backtrace please..

---------------------------------------------------------------------------

[2001-04-02 09:22:07] [EMAIL PROTECTED]
_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.

---------------------------------------------------------------------------


Full Bug description available at: http://bugs.php.net/?id=10114


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to