php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23553 segmentation fault in PHP CLI
Submitted: 2003-05-08 16:52 UTC Modified: 2003-05-13 20:00 UTC
From: bugs at valere dot net Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.3.2RC2 OS: FreeBSD-4.8 Stable
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: bugs at valere dot net
New email:
PHP Version: OS:

 

 [2003-05-08 16:52 UTC] bugs at valere dot net
1) make install

2)  CPPFLAGS="-I/usr/local/include/gd/ -I/usr/local/BerkeleyDB.3.3/include/" \
        LDFLAGS=-L/usr/local/BerkeleyDB.3.3/lib/ \
         ./configure --with-apxs=/usr/local/www/bin/apxs \
        --enable-debug \
        --with-pgsql=/usr/local/pgsql \
        --with-mysql=/usr/local/mysql \
        --with-xml \
        --with-openssl \
        --with-gd \
        --with-gettext \
        --with-mcrypt \
        --with-imap \
        --with-zlib-dir=/usr/local/src/zlib-1.1.4 \
        --enable-track-vars \
        --enable-trans-sid \
        --with-db3=/usr/local/BerkeleyDB.3.3 \
        --enable-ftp

3) FreeBSD 4.8 stable, postgresql 7.3.2, mysql-4.0.12, gd bundled (2.0.12 compatible), mcrypt >= 2.4.x, zlib 1.1.4,  OpenSSL 0.9.7a Feb 19 2003 

4) gdb backtrace

Examining /usr/local/src/apache/php-4.3.2RC2/sapi/cli/php...Using cached time  9
:08:16 May 08, 2003 for /usr/local/src/apache/php-4.3.2RC2/sapi/cli/php
modified  9:08:16 May 08, 2003...up-to-date.
Examining install-pear-installer...non-existent...modified before source...out-o
f-date.
install-pear-installer:> = /usr/local/src/apache/php-4.3.2RC2/sapi/cli/php
install-pear-installer:? = /usr/local/src/apache/php-4.3.2RC2/sapi/cli/php
/usr/local/src/apache/php-4.3.2RC2/sapi/cli/php -n -dsafe_mode=0 /usr/local/src/
apache/php-4.3.2RC2/pear/install-pear.php /usr/local/src/apache/php-4.3.2RC2/pea
r/package-*.xml
Segmentation fault (core dumped)
*** Error code 139

Stop in /usr/local/src/apache/php-4.3.2RC2.
*** Error code 1

Stop in /usr/local/src/apache/php-4.3.2RC2.

(root@gw.valere.net) 09:12:39
(523 / 23) [/usr/local/src/apache/php-4.3.2RC2]$: gdb '/usr/local/src/apache/php
-4.3.2RC2/sapi/cli/php -n -dsafe_mode=0 /usr/local/src/apache/php-4.3.2RC2/pear/
install-pear.php /usr/local/src/apache/php-4.3.2RC2/pear/package-*.xml' php.core
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...Deprecated bfd_read called a
t /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 2
627 in elfstab_build_psymtabs
Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../cont
rib/gdb/gdb/dbxread.c line 933 in fill_symbuf


unknown option `-n'

Core was generated by `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libcrypt.so.2...done.
Reading symbols from /usr/local/lib/libc-client4.so.8...done.
Reading symbols from /usr/local/pgsql/lib/libpq.so.3...done.
Reading symbols from /usr/local/mysql/lib/mysql/libmysqlclient.so.12...done.
Reading symbols from /usr/local/lib/libmcrypt.so.8...done.
Reading symbols from /usr/local/lib/libltdl.so.1...done.
Reading symbols from /usr/lib/libpam.so.1...done.
Reading symbols from /usr/local/lib/libintl.so.4...done.
Reading symbols from /usr/local/lib/libpng.so.5...done.
Reading symbols from /usr/local/BerkeleyDB.3.3/lib/libdb-3.3.so...done.
Reading symbols from /usr/lib/libssl.so.3...done.
Reading symbols from /usr/lib/libcrypto.so.3...done.
Reading symbols from /usr/lib/libm.so.2...done.
Reading symbols from /usr/lib/libc.so.4...done.
---Type <return> to continue, or q <return> to quit---
Reading symbols from /usr/lib/libz.so.2...done.
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0  0x2866bd28 in strcmp () from /usr/lib/libc.so.4
(gdb) bt
#0  0x2866bd28 in strcmp () from /usr/lib/libc.so.4
#1  0x283546aa in OBJ_NAME_cleanup () from /usr/local/pgsql/lib/libpq.so.3
Cannot access memory at address 0x2.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-08 19:20 UTC] iliaa@php.net
Given your backtrace the segfault appears to be inside the PostgreSQL library and not PHP. If there are no more backtrace steps beside the 2 you've shown this is not a PHP bug.
 [2003-05-09 11:16 UTC] bugs at valere dot net
I've submitted this bug to pgsql-bugs.
 [2003-05-13 12:31 UTC] arousch at yahoo dot com
I get this core dump error too.  I am not using _any_ sql.  I'm just installing the mod_php4 for apache13.

and get:
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20020429/
Installing PEAR environment:      /usr/local/lib/php/
Segmentation fault (core dumped)
*** Error code 139

Freebsd 5.0-RELEASE-P7, Sparc64, Apache 1.3.27_4
 [2003-05-13 20:00 UTC] sniper@php.net
Looks like a case where openssl used for PHP is different version than the one used in pgsql. 

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 21:00:01 2026 UTC