469,616 Members | 1,792 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,616 developers. It's quick & easy.

php4+mysql segfaults

I'm having big problems with php and mysql. php segfaults on certain
mysql calls, with the following logs in apache error log:
[Tue May 4 14:12:09 2004] [notice] child pid 60386 exit signal
Segmentation fault (11)

and in the syslog:
May 4 13:53:49 op-fi1 /kernel: pid 60023 (httpd), uid 80: exited on
signal 11

The following code segfaults php every time (or apache when accessed
from the browser):

<?php
$link = mysql_connect("localhost", "root", "secret");
mysql_select_db("mydatabase");
$result = mysql_query(SELECT * FROM mytable);
echo "<pre>";var_dump(mysql_fetch_field($result));
mysql_free_result($result);
mysql_close($link);

gdb output gives this:

Program received signal SIGSEGV, Segmentation fault.
0x81a5d1c in add_property_string_ex ()
(gdb) backtrace
#0 0x81a5d1c in add_property_string_ex ()
#1 0x80ebd2a in zif_mysql_fetch_field ()
#2 0x81b5b42 in execute ()
#3 0x81a3abe in zend_execute_scripts ()
#4 0x817bb1d in php_execute_script ()
#5 0x81bd882 in main ()
#6 0x8073d66 in _start ()

Does anyone have any ideas?

Thanks,

Marko

ps. Here are some phpinfo() details:

System FreeBSD op-fi1 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Wed Jun
i386
Build Date May 4 2004 13:40:10
Configure Command './configure' '--enable-versioning'
'--enable-memory-limit' '--with-layout=GNU' '--with-zlib-dir=/usr'
'--disable-all' '--with-regex=php' '--disable-cli' '--enable-bcmath'
'--with-bz2=/usr' '--enable-ctype' '--with-dom=/usr/local'
'--with-dom-xslt=/usr/local' '--with-dom-exslt=/usr/local'
'--enable-ftp' '--with-gd' '--enable-gd-native-ttf'
'--enable-gd-jis-conv' '--with-freetype-dir=/usr/local'
'--with-t1lib=/usr/local' '--with-jpeg-dir=/usr/local'
'--with-png-dir=/usr/local' '--with-xpm-dir=/usr/X11R6'
'--with-gettext=/usr/local' '--with-iconv-dir=/usr/local'
'--with-iconv=/usr/local' '--enable-mbstring'
'--with-mcrypt=/usr/local' '--with-mhash=/usr/local'
'--with-mime-magic=/usr/share/misc/magic.mime'
'--with-mysql=/usr/local' '--enable-overload' '--with-pcre-regex=yes'
'--enable-posix' '--enable-session' '--enable-sockets'
'--enable-tokenizer' '--with-unixODBC=/usr/local' '--enable-wddx'
'--with-expat-dir=/usr/local' '--enable-xml' '--with-xmlrpc'
'--with-zip=/usr/local' '--with-zlib=yes'
'--with-apxs=/usr/local/sbin/apxs' '--with-imap=/usr/local'
'--with-imap-ssl=/usr/local' '--prefix=/usr/local'
'i386-portbld-freebsd4.8'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/etc/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety disabled
Registered PHP Streams php, http, ftp, compress.bzip2, compress.zlib

mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.58
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE -I/usr/local/include/mysql
MYSQL_LIBS -L/usr/local/lib -lmysqlclient
Jul 17 '05 #1
1 1770
On 4 May 2004 04:31:36 -0700, dj****@yahoo.com (marko) wrote:
I'm having big problems with php and mysql. php segfaults on certain
mysql calls, with the following logs in apache error log:
[Tue May 4 14:12:09 2004] [notice] child pid 60386 exit signal
Segmentation fault (11)

and in the syslog:
May 4 13:53:49 op-fi1 /kernel: pid 60023 (httpd), uid 80: exited on
signal 11

The following code segfaults php every time (or apache when accessed
from the browser):

<?php
$link = mysql_connect("localhost", "root", "secret");
mysql_select_db("mydatabase");
$result = mysql_query(SELECT * FROM mytable);
echo "<pre>";var_dump(mysql_fetch_field($result));
mysql_free_result($result);
mysql_close($link);

gdb output gives this:

Program received signal SIGSEGV, Segmentation fault.
0x81a5d1c in add_property_string_ex ()
(gdb) backtrace
#0 0x81a5d1c in add_property_string_ex ()
#1 0x80ebd2a in zif_mysql_fetch_field ()
#2 0x81b5b42 in execute ()
#3 0x81a3abe in zend_execute_scripts ()
#4 0x817bb1d in php_execute_script ()
#5 0x81bd882 in main ()
#6 0x8073d66 in _start ()

Does anyone have any ideas?


Could it be related to bug 26208? http://bugs.php.net/bug.php?id=26208

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by David | last post: by
6 posts views Thread by David Scribler | last post: by
1 post views Thread by Matthew Crouch | last post: by
5 posts views Thread by ligerdave | last post: by
reply views Thread by Julien Demoor | last post: by
4 posts views Thread by Andy Baxter | last post: by
reply views Thread by John Oliver | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.