473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 1974
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David | last post by:
Hi, I am running Debian 3.0r1 with Apache 1.3.27, MySQL 3.23.49 and PHP 4.3.3RC3. I installed Apache and MySQL when I originally installed Debian and these work fine. I recently wanted to run...
2
by: pancho | last post by:
Greetings, I need help configuring/building PHP3 with MySQL as a DSO on a Solaris 8 box - this module is needed to host some existing sites I will be migrating Note. I built PHP4 from source and...
6
by: David Scribler | last post by:
I am trying to use PHPNuke on a linux box but I think PHP does not see the Mysql Server. When I use the test php program I get this error "Fatal error: Call to undefined function:...
1
by: Matthew Crouch | last post by:
I *always* have trouble getting LAMP up on a new distribution I'm trying out -- this is the chief reason for a bad case of upgrade-o-phobia that i have. This week it's Debian (Ubuntu). I...
5
by: ligerdave | last post by:
i run php4+mysql+apache2 on linux(ubuntu). every time i try to use mysql_connect function, it says something like this: Fatal error: Call to undefined function: mysql_connect() in...
0
by: Julien Demoor | last post by:
Hello, My website is blog/news aggregator. It reads rss and atom feeds to store and stores data in a mysql database. The feeds may use different character encodings, generally utf-8 and...
4
by: Andy Baxter | last post by:
hello, I'm using the php4-mysql module with php4 under debian linux (sarge). I have a script, schedule.php, which runs fine when I invoke it from the command line, but fails with the error: ...
0
by: John Oliver | last post by:
Fedora Core 2 server with httpd-2.0.54-10.2 php-4.3.10-2.4 php-mysql-4.3.10-2.4 It had MySQL 3.23.58.something on it, but the PHP websites were using a 4.something MySQL on another machine. I...
3
by: doctorhardik | last post by:
hai all i am try configure php4.3.9 on my FC-3 machine. and my mysql database version 5.0.1, in phpinfo file it show mysql but when i run php -v command it show error like
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.