php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33058 segfault on php -v
Submitted: 2005-05-18 16:37 UTC Modified: 2005-05-19 19:13 UTC
From: jas at cs dot yorku dot ca Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.3.11 OS: Redhat 7.3
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: jas at cs dot yorku dot ca
New email:
PHP Version: OS:

 

 [2005-05-18 16:37 UTC] jas at cs dot yorku dot ca
Description:
------------
Hi.

I am experiencing a "similar" problem to bug ID 32783 (marked "bogus") with PHP 4.3.11.

I was running php 4.3.4.  I tried to upgrade to 4.3.11.
The compile went flawlessly.  However, when I tried to run a "make install", the "install pear" component failed with a seg fault.  Similarly, if you just run "php -v", there is a segfault.

I tried to use the Apache module that came with php 4.3.11 with the existing (4.3.4) lib/php structure, and that worked.  However, I couldn't use pear to do any upgrades...

hop 301 % php -v
Segmentation fault
hop 302 % gdb php
GNU gdb 6.0
Copyright 2003 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 "i686-pc-linux-gnu"...
(gdb) run -v
Starting program: /cs/local/bin/php -v

Program received signal SIGSEGV, Segmentation fault.
0x4207fa78 in strcmp () from /lib/i686/libc.so.6
(gdb) quit

---

I downgraded to php-4.3.10.  It compiled perfectly, and everything just works - the php command, and the module.
pear was able to upgrade all of my modules just fine.

I too have a redhat-7.3 base.

Jason.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-18 17:02 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2005-05-18 18:32 UTC] jas at cs dot yorku dot ca
here is the backtrace requested... sorry for omitting that..

GNU gdb 6.0
Copyright 2003 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 "i686-pc-linux-gnu"...
(gdb) run
Starting program: /tmp/php-4.3.11/sapi/cli/php 

Program received signal SIGSEGV, Segmentation fault.
0x4207fa78 in strcmp () from /lib/i686/libc.so.6
(gdb) bt
#0  0x4207fa78 in strcmp () from /lib/i686/libc.so.6
#1  0x400d7840 in obj_name_cmp ()
   from /cs/local/packages/mysql-4.0.13/lib/mysql/libmysqlclient.so.12
#2  0x400d77d8 in obj_name_cmp ()
   from /cs/local/packages/mysql-4.0.13/lib/mysql/libmysqlclient.so.12
#3  0x400b1388 in getrn ()
   from /cs/local/packages/mysql-4.0.13/lib/mysql/libmysqlclient.so.12
#4  0x4207a058 in malloc () from /lib/i686/libc.so.6
#5  0x400b10fb in lh_insert ()
   from /cs/local/packages/mysql-4.0.13/lib/mysql/libmysqlclient.so.12
#6  0xbfffddd0 in ?? ()

it appears the problem is related to mysql?
seems strange since mysql didn't change when I moved from 4.3.10 to 4.3.11, but php did... hmm.
 [2005-05-18 18:40 UTC] tony2001@php.net
Are you sure you're not trying to load an extension compiled for 4.3.4 ?
 [2005-05-18 19:09 UTC] jas at cs dot yorku dot ca
If it helps, I compiled again without the mysql support, and php works.

strange?

I'm just running the "php" command straight from
sapi/cli/php.

jas.
 [2005-05-18 20:23 UTC] tony2001@php.net
What was your configure line before (i.e. when you compiled it with mysql support)?
 [2005-05-19 19:05 UTC] jas at cs dot yorku dot ca
env CFLAGS="-DEAPI" ./configure '--prefix=/cs/local' '--with-mysql=/cs/local/packages/mysql' '--with-apxs=/cs/local/packages/apache/bin/apxs' '--with-imap=/tmp/imap-2004c1' '--with-imap-ssl=/tmp/imap-2004c1' '--with-openssl=/cs/local' 
'--enable-ftp' 
'--with-gettext' 
'--with-xml' 
'--with-mcrypt=/cs/local' 
'--with-exec-dir=/cs/local/bin' 
'--with-zlib=/cs/local'

I tried upgrading mysql from 4.0.13 to 4.0.24, and this solved the problem (for me).  PHP 4.3.11 now works.
I still don't understand how 4.3.11 would not work with
the existing mysql 4.0.13 when it WOULD work with 4.3.10.
 [2005-05-19 19:13 UTC] sniper@php.net
As long as it works -> not PHP bug.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 26 23:00:02 2025 UTC