473,805 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(SEL ECT * FROM mytable);
echo "<pre>";var_dum p(mysql_fetch_f ield($result));
mysql_free_resu lt($result);
mysql_close($li nk);

gdb output gives this:

Program received signal SIGSEGV, Segmentation fault.
0x81a5d1c in add_property_st ring_ex ()
(gdb) backtrace
#0 0x81a5d1c in add_property_st ring_ex ()
#1 0x80ebd2a in zif_mysql_fetch _field ()
#2 0x81b5b42 in execute ()
#3 0x81a3abe in zend_execute_sc ripts ()
#4 0x817bb1d in php_execute_scr ipt ()
#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_TY PE 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 2007
On 4 May 2004 04:31:36 -0700, dj****@yahoo.co m (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_d b("mydatabase") ;
$result = mysql_query(SEL ECT * FROM mytable);
echo "<pre>";var_dum p(mysql_fetch_f ield($result));
mysql_free_res ult($result);
mysql_close($l ink);

gdb output gives this:

Program received signal SIGSEGV, Segmentation fault.
0x81a5d1c in add_property_st ring_ex ()
(gdb) backtrace
#0 0x81a5d1c in add_property_st ring_ex ()
#1 0x80ebd2a in zif_mysql_fetch _field ()
#2 0x81b5b42 in execute ()
#3 0x81a3abe in zend_execute_sc ripts ()
#4 0x817bb1d in php_execute_scr ipt ()
#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
2787
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 some PHP scripts on my web server that talked to a MySQL database. I installed php4 and php4-mysql using apt-get. Unfortunatly I can't get the scripts to work. I keep getting the following error: Fatal error: Call to undefined function:...
2
2591
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 it loads without an error. When I try t run "apachectl configtest" I get the following error: -- Cannot load /usr/local/apache/libexec/libphp3.so into server: ld.so.1: /usr/local/apache/bin/httpd: fatal: relocation error: file...
6
2270
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: mysql_connect() in /home/david/html/html/test.php on line 3" I am using Debian unstable. Is there some setting I need to look at in the php.ini file?
1
2069
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 successfully apt-getted apache2, mysql, and php4, but the latter did not include the mysql extension. Have been looking around for a place to download this so I can just plug it in and I thought I'd ask here if anyone knew of such a place. Right now...
5
1417
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 /home/ligerdave/website/test.php on line 13 plz help!!!!!
0
1424
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 iso-8859-1. The parsing script knows from the database when it visits a utf-8 feed and uses the php function utf8_decode before send information to mysql. This has been working great for five month. Without any noticeable change in the configuration or...
4
1810
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: Fatal error: Call to undefined function: mysql_connect() in /local/rivulet/interface/db.php on line 4 when I try to invoke it as a web page (using apache2). As far as I know,
0
1367
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 updated the MySQL on this machine to mysql-4.1.20-1.FC4.1 and now no PHP sites come up. But mysql.so is right where it's always been: # ls -l /usr/lib/php4/mysql.so -rwxr-xr-x 1 root root 44364 Dec 21 2004 /usr/lib/php4/mysql.so And the...
3
2948
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
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10607
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10359
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6875
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5541
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4317
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.