[PHP-DEV] PHP 4.0 Bug #7954 Updated: Apache seg fault on any call of mysql_connect() From: wiseass <email protected>
Date: 11/30/00

ID: 7954
User Update by: wiseass <email protected>
Old-Status: Feedback
Status: Open
Bug Type: MySQL related
Description: Apache seg fault on any call of mysql_connect()

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.

Previous Comments:
---------------------------------------------------------------------------

[2000-11-28 05:53:43] sniper <email protected>
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-23 22:46:44] wiseass <email protected>
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-23 21:25:11] wiseass <email protected>
'./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.

---------------------------------------------------------------------------

Full Bug description available at: http://bugs.php.net/?id=7954

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>