Re: core dump from apache/php?!

From: Date: Tue, 01 Jun 1999 17:38:00 +0000
Subject: Re: core dump from apache/php?!
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-6363@lists.php.net to get a copy of this message
You didn't say which version of PHP, but 3.0.8 has a bug that may cause coredumps when reading from sockets. You have three options: go back to 3.0.7, wait for 3.0.9 or fetch the latest CVS version (where Sascha has fixed it). - Stig On Tue, 1 Jun 1999, Tyler Hall wrote: > I'm sending this email because it was mentioned in the FAQ your web site. > I've had lots of problems with php, but they were all my fault and given > enough time I've always been able to correct the mistake and get it going > again :) > However, this one's over my head. The basic problem is this: When I have > netscape load up a particular script, a window comes up saying document > contains no data. After a bit of debugging, I've narrowed the problem > down to this one line: > > $urlp=fopen($rem_url[$i],"r"); > > I'm just trying to open a connection to the university's webserver. The > script, when complete, will test any given url to ensure that the site > exists, is alive, and that the page is there as expected. But that line up > there causes a core dump. Note that when I compiled php, I did not put > this option in: > > --disable-url-fopen-wrapper > > and since I can't find any reference to it in the php.ini file, I'm > assuming it is turned on by default. Is this correct? Anyway, if it's my > fault, could you please help me? Otherwise, I hope the following > copy/paste bit helps you out... > > By the way: for that line of code, $i is an integer (which was only ever a > 0 as assigned by a FOR loop), and $rem_url is an array of strings (which > only held the string "http://www.unb.ca/index.html" > in element 0). Right > now, fclose($urlp) immediately follows, and I've tried commenting both out > and then one of each...It seems that only the fopen function causes a core > dump. Also note that I have had no trouble with opening files or even > connections to a MySQL database server. I have compiled php in with > apache running on a linux box. > > # gdb httpd > GNU gdb 4.17 > Copyright 1998 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you > are > welcome to change it and/or distribute copies of it under certain > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for > details. > This GDB was configured as "i386-redhat-linux"... > (no debugging symbols found)... > (gdb) run -X -f /etc/httpd/conf/httpd.conf > Starting program: /usr/sbin/httpd -X -f /etc/httpd/conf/httpd.conf > > Program received signal SIGSEGV, Segmentation fault. > 0x12121212 in ?? () > (gdb) bt > #0 0x12121212 in ?? () > Cannot access memory at address 0x12121212. > > > > > -- > PHP Development Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.dev (#6363) next »