php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6484 Segmentation fault when querying image type fields.
Submitted: 2000-09-01 11:56 UTC Modified: 2001-05-14 12:49 UTC
From: aulich at tasa-exchange dot army dot mil Assigned:
Status: Closed Package: Sybase (dblib) related
PHP Version: 4.0.2 OS: RedHat Linux 6.2
Private report: No CVE-ID: None
 [2000-09-01 11:56 UTC] aulich at tasa-exchange dot army dot mil
The following SQL statement will run OK returning a good result.

SELECT ldi_id from ldi_text where obj_id=32118

The following SQL statement will get a segmentation fault.

SELECT * from ldi_text where obj_id=32118

The table has 4 fields  (obj_id int, ldi_id int, ldi_tx_seqnce smallint, ldi_tx_data image)

I have tried this with numerous tables and fields and all queries work OK until I try to query any field with an image datatype.

My configure line for php:
./configure --with-sybase=/opt/sybase-11.9.2 --with-informix=/opt/informix --with-apache=../apache_1.3.12 --enable-track-vars

The gdb backtrace:
(gdb) bt
#0  0x402e9f00 in chunk_alloc (ar_ptr=0x4037ed60, nb=28696) at malloc.c:2948
#1  0x402e95ce in __libc_malloc (bytes=28692) at malloc.c:2696
#2  0x80e023f in _emalloc (size=28673) at zend_alloc.c:155
#3  0x80d7f9c in php_sybase_get_column_content (sybase_ptr=0x821575c,
    offset=4, result_ptr=0x82151b0, column_type=34) at php_sybase_db.c:666
#4  0x80d82b2 in php_if_sybase_query (ht=2, return_value=0x821b6fc,
    this_ptr=0x0, return_value_used=1) at php_sybase_db.c:776
#5  0x810edbc in execute (op_array=0x82143a4) at ./zend_execute.c:1519
#6  0x80eabb8 in zend_execute_scripts (type=8, file_count=3) at zend.c:712
#7  0x807f781 in php_execute_script (primary_file=0xbffff8d4) at main.c:1173
#8  0x80f4859 in apache_php_module_main (r=0x81fc88c, display_source_mode=0)
    at sapi_apache.c:89
#9  0x807d48b in send_php ()
#10 0x807d4b8 in send_parsed_php ()
#11 0x8118823 in ap_invoke_handler ()
#12 0x812bd59 in process_request_internal ()
#13 0x812bdbc in ap_process_request ()
#14 0x812365e in child_main ()
#15 0x81237ec in make_child ()
#16 0x8123949 in startup_children ()
#17 0x8123f76 in standalone_main ()
#18 0x8124703 in main ()
#19 0x402a89cb in __libc_start_main (main=0x81243bc <main>, argc=2,
    argv=0xbffffa84, init=0x8063d6c <_init>, fini=0x8151d2c <_fini>,
    rtld_fini=0x4000ae60 <_dl_fini>, stack_end=0xbffffa7c)
    at ../sysdeps/generic/libc-start.c:92
(gdb)

My php.ini file is stock and has not been modified.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-16 11:40 UTC] aulich at tasa-exchange dot army dot mil
I now have this working with Apache 1.3.14 and PHP 4.0.3pl1. I have always gotten a Parse error before SQLDA line 273 error in ctpublic.h, whenever I tried to compile --with-sybase-ct using Sybase libraries. Using freetds and the sybase libraries in PHP/extras I always get unresolved references. I finally replaced the ctpublic.h in the Syabse libraries withe the one from the PHP/extras. All compiled and worked fine, including querying for image datatypes. I don't know if these problems were unique to me or not. I finally have a working PHP/Sybase situation.
 [2000-10-16 11:40 UTC] aulich at tasa-exchange dot army dot mil
I now have this working with Apache 1.3.14 and PHP 4.0.3pl1. I have always gotten a Parse error before SQLDA line 273 error in ctpublic.h, whenever I tried to compile --with-sybase-ct using Sybase libraries. Using freetds and the sybase libraries in PHP/extras I always get unresolved references. I finally replaced the ctpublic.h in the Syabse libraries withe the one from the PHP/extras. All compiled and worked fine, including querying for image datatypes. I don't know if these problems were unique to me or not. I finally have a working PHP/Sybase situation.
 [2001-05-14 12:49 UTC] joey@php.net
So this is a closed issue.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC