php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1652 Document contains no data
Submitted: 1999-07-02 18:13 UTC Modified: 1999-07-03 11:00 UTC
From: larosa at giotto dot info dot uniroma2 dot it Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 3.0.11 OS: RedHat Linux 6.0 - Linux 2.2.9
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: larosa at giotto dot info dot uniroma2 dot it
New email:
PHP Version: OS:

 

 [1999-07-02 18:13 UTC] larosa at giotto dot info dot uniroma2 dot it
Like in bug 1477 when i try to use pg_fetch_array or pg_fetch_object the related httpd child die with a segmentation fault an the browser din't reciece anything and return "Document contain no data".
I have no problem with pg_fetch_row or pg_result. Here is the backtrace that gdb produced when i 've tried to run httpd in it with the parameter "-X".
With pg_fetch_array:

#0  0x400f7626 in chunk_free (ar_ptr=0x40187580, p=0x80c34dd) at malloc.c:3006
#1  0x400f7505 in __libc_free (mem=0x80c34e4) at malloc.c:2932
#2  0x4022ee96 in php3_pgsql_fetch_hash (ht=0x80bd8f8, 
    return_value=0x40281334, list=0x40282840, plist=0x40282800)
    at functions/pgsql.c:979
#3  0x4022eed1 in php3_pgsql_fetch_array (ht=0x80bd8f8, 
    return_value=0x40281334, list=0x40282840, plist=0x40282800)
    at functions/pgsql.c:988
#4  0x4024457f in phpparse () at control_structures_inline.h:934
#5  0x4020c040 in php3_parse (yyin=0x80b6b80) at main.c:1553
#6  0x4020c31c in apache_php3_module_main (r=0x80a191c, fd=19, 
    display_source_mode=0, preprocessed=0) at main.c:1934
#7  0x40209542 in send_php3 ()
#8  0x402095aa in send_parsed_php3 ()
#9  0x80517e1 in ap_invoke_handler ()
#10 0x805e28b in ap_some_auth_required ()
#11 0x805e2db in ap_process_request ()
#12 0x8058c88 in ap_child_terminate ()
#13 0x8058dbf in ap_child_terminate ()
#14 0x8058eb9 in ap_child_terminate ()
#15 0x8059368 in ap_child_terminate ()
#16 0x8059920 in main ()
#17 0x400b6cb3 in __libc_start_main (main=0x80596e0 <main>, argc=2, 
    argv=0xbffffc14, init=0x804da1c <_init>, fini=0x8065a8c <_fini>, 
    rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffc0c)
    at ../sysdeps/generic/libc-start.c:78

With pg_fetch_object:

#0  0x400f7626 in chunk_free (ar_ptr=0x40187580, p=0x80c34dd) at malloc.c:3006
#1  0x400f7505 in __libc_free (mem=0x80c34e4) at malloc.c:2932
#2  0x4022ee96 in php3_pgsql_fetch_hash (ht=0x80bd8f8, 
    return_value=0x40281334, list=0x40282840, plist=0x40282800)
    at functions/pgsql.c:979
#3  0x4022eefb in php3_pgsql_fetch_object (ht=0x80bd8f8, 
    return_value=0x40281334, list=0x40282840, plist=0x40282800)
    at functions/pgsql.c:996
#4  0x4024457f in phpparse () at control_structures_inline.h:934
#5  0x4020c040 in php3_parse (yyin=0x80b6b80) at main.c:1553
#6  0x4020c31c in apache_php3_module_main (r=0x80a191c, fd=19, 
    display_source_mode=0, preprocessed=0) at main.c:1934
#7  0x40209542 in send_php3 ()
#8  0x402095aa in send_parsed_php3 ()
#9  0x80517e1 in ap_invoke_handler ()
#10 0x805e28b in ap_some_auth_required ()
#11 0x805e2db in ap_process_request ()
#12 0x8058c88 in ap_child_terminate ()
#13 0x8058dbf in ap_child_terminate ()
#14 0x8058eb9 in ap_child_terminate ()
#15 0x8059368 in ap_child_terminate ()
#16 0x8059920 in main ()
#17 0x400b6cb3 in __libc_start_main (main=0x80596e0 <main>, argc=2, 
    argv=0xbffffc14, init=0x804da1c <_init>, fini=0x8065a8c <_fini>, 
    rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffc0c)
    at ../sysdeps/generic/libc-start.c:78

The problem appear to be in php3_pgsql_fetch_hash when it call a malloc.
I hope that that is enough to find the problem

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-03 11:00 UTC] sas at cvs dot php dot net
$ cd php-3.0.11/functions
$ wget -O pgsql.c http://cvs.php.net/cvsweb.cgi/functions/pgsql.c?rev=1.87

Recompile. It should work fine then.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 01:01:28 2025 UTC