|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37463 Segmenation fault when both MySQLi and SNMP are enabled
Submitted: 2006-05-16 17:55 UTC Modified: 2006-05-17 16:18 UTC
From: subscription at nazarenko dot net Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5CVS-2006-05-16 (snap) OS: Linux SuSE 10.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: subscription at nazarenko dot net
New email:
PHP Version: OS:


 [2006-05-16 17:55 UTC] subscription at nazarenko dot net
Trying to compile PHP CLI module with MySQL and SNMP support.
When both are enabled php CLI SAPI gives segfault.
When only one of them is enabled then everything looks normal.

The libraries versions are as follows:

MySQL 5.0.21
zlib 1.2.3

Reproduce code:
./configure --disable-all --with-mysqli --with-zlib

sapi/cli/php -i  produces normal output:
MysqlI Support => enabled
Client API library version => 5.0.21
Client API header version => 5.0.21

./configure --disable-all --with-snmp

sapi/cli/php -i  produces normal output:
NET-SNMP Support => enabled
NET-SNMP Version =>

Actual result:
./configure --disable-all --with-snmp --with-mysqli --with-zlib

sapi/cli/php produces *Segfault*


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-16 17:58 UTC]
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 for *NIX and for Win32

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.

 [2006-05-16 18:08 UTC] subscription at nazarenko dot net
Is this of any help?

#0  0x6568746f in ?? ()
#1  0xb7d0ebec in EVP_DigestInit_ex () from /usr/lib/
#2  0xbfcd3204 in ?? ()
#3  0xb7d7bb4c in CAST_S_table7 () from /usr/lib/
#4  0x000000ca in ?? ()
#5  0x00000001 in ?? ()
#6  0x00000000 in ?? ()
 [2006-05-16 18:27 UTC]
Yes. Looks like snmp and mysql were compiled with two different openssl libraries.
Anyway this is not PHP problem, it's caused by a mess in your system.
 [2006-05-16 19:18 UTC] subscription at nazarenko dot net
Thank you for addressing this issue. However, I find it hard to believe that my system is a "mess", as you put it, since it is an aboslutely fresh install of newly released SuSE disribution with an *absolutely minimal* packages selection, no GUI and only the c++ compiler and tools.

The output of the find and rpm command reveals that I have no "different OpenSSL libraries" installed:

find / -type f -name libcrypto*

find / -type f -name libcrypto*

rpm -qa | grep ssl

There is no way "some other" OpenSSL libraries exist on this system.

The only thing I can think of is that I did not compile openssl or net-snmp on this system, I installed the binaries from the distribution RPMs but that never created a problem before.
 [2006-05-16 19:28 UTC]
It's good that you believe your system is ok.
But I can hardly imagine someone else able to reproduce it.
Since your backtrace contains absolutely minimal information too, I can only say that you'll have to debug it yourself.
But as I've said, it looks like symbols clash between snmp and MySQL and it has nothing to do with PHP.
Please reopen the report as soon as you have more information to provide.
Until then -> bogus. 
 [2006-05-16 20:01 UTC] subscription at nazarenko dot net
I will try to recompile MySQL and Net-Snmp from source and see if that helps.
 [2006-05-17 15:23 UTC] subscription at nazarenko dot net
Recompiled MySQL from source today.
PHP works fine now (together with SNMP).

My experience with MyQSL supplied RPMs have been less than satisfactory lately. I had to recompile it also on my 64bit Linux system because PHP was refusing to use the supplied libmysql from the RPM (fPIC flag / relocation problem):

Thanks for your support.
 [2006-05-17 15:30 UTC] subscription at nazarenko dot net
Opened the bug again because was not sure if you get to see the comments automatically when the status is bogus.
 [2006-05-17 16:18 UTC]
We do.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Feb 26 06:01:25 2024 UTC