php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7954 Apache seg fault on any call of mysql_connect()
Submitted: 2000-11-23 21:25 UTC Modified: 2000-11-30 21:40 UTC
From: wiseass at vianet dot ca Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0.3pl1 OS: Linux 6.0
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: wiseass at vianet dot ca
New email:
PHP Version: OS:

 

 [2000-11-23 21:25 UTC] wiseass at vianet dot ca
'./configure' '--with-apxs=/usr/apache/bin/apxs' '--with-config-file-path=/usr/local/etc' '--with-gd' '--with-imap=/usr/src/apache/modules/php/depend/imap-2000' '--with-mysql' '--with-ldap' '--with-zlib' '--enable-track-vars'

Script:
<?php
$link = mysql_connect("localhost", "dan", "password");
?>
or any variant thereof.

Any script that calls mysql_connect executes properly and when exiting, gives this message in /var/log/httpd/error_log:
[Thu Nov 23 20:32:48 2000] [notice] child pid 2876 exit signal Segmentation fault (11)

gdb) run -X -f /usr/apache/conf/httpd.conf
Starting program: /usr/apache/bin/httpd -X -f /usr/apache/conf/httpd.conf

Program received signal SIGTRAP, Trace/breakpoint trap.
0x40001690 in _start () at rtld.c:138
138     rtld.c: No such file or directory.
(gdb) bt
#0 0x40001690 in _start () at rtld.c:138

That's all the info I can dig up.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-23 22:46 UTC] wiseass at vianet dot ca
I note that if I use mysql_pconnect() the seg fault does not happen. I haven't bothered waiting for the connection to time out, but if I kill the most recent mysql process manually there is no seg fault.
 [2000-11-28 05:53 UTC] sniper@php.net
Could you please try a snapshot from http://snaps.php.net/
to check if this happens with it too.

(I can not reproduce this with latest CVS)

And do you happen to run some other module with
Apache which uses Mysql?

--Jani
 [2000-11-30 20:25 UTC] wiseass at vianet dot ca
I recompiled --with-mysql=/usr/local and the problem seems to be corrected. Because I used mod_auth_mysql with Apache I was supposed to point PHP right to the mysql libraries when compiling as DSO. PHP warned me about this when I first compiled it, but I glossed over it. Sorry for wasting your time, but thanks for pointing me in the right direction.
 [2000-11-30 21:40 UTC] sniper@php.net
closed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 02:01:29 2024 UTC