Re: [PHP4BETA] 'return' crash on Mac OS X Server with PHP 4.0b3
| From: | Andi Gutmans | Date: | Mon, 14 Feb 2000 20:44:04 +0000 |
| Subject: | Re: [PHP4BETA] 'return' crash on Mac OS X Server with PHP 4.0b3 | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-10267@lists.php.net to get a copy of this message | ||
I think it'd be best if you tried the current CVS tree or a snapshot from http://va.php.net/~sas/snapshots
Andi
At 01:33 PM 2/14/00 -0700, Jon Jensen wrote:
I'm replying to my own message. I'm guessing my backtrace is probably not helpful because, as gdb notes, 'no debugging symbols found'. I'll see if I can recompile with debugging symbols and send a more helpful bug report. Sorry, Jon On Mon, 14 Feb 2000, Jon Jensen wrote: Thanks for the help with gdb, Chad. Here's the backtrace when I run sqaure.php: [viscom] root# gdb /usr/local/apache/bin/httpd GNU gdb 4.17 (Apple version gdb-121) 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 "powerpc-apple-rhapsody". Reading symbols from "/usr/local/apache/bin/httpd"...(no debugging symbols found)...done. Reading symbols from "/usr/lib/dyld" at 0x41100000 (offset 0x0) with prefix "dyld_"...(no debugging symbols found)...done Reading symbols from "/System/Library/Frameworks/System.framework/Versions/B/System" at 0x41300000 (offset 0x0)...(no debugging symbols found)...done (gdb) run -X Starting program: /usr/local/apache/bin/httpd -X [Switching to process 1247 thread 0x1400] Program received signal SIGSEGV, Segmentation fault. 0x240a4 in ?? () (gdb) bt #0 0x240a4 in ?? () #1 0x235e0 in ?? () #2 0x60bd8 in ?? () #3 0x6859c in ?? () #4 0x26ca8 in ?? () #5 0x24648 in ?? () #6 0x22ac0 in ?? () #7 0x22b20 in ?? () #8 0xea1e8 in mergesort () #9 0xf2d44 in mergesort () #10 0xf2dd8 in mergesort () #11 0xd660c in mergesort () #12 0xd68a8 in mergesort () #13 0xd6ad4 in mergesort () #14 0xd756c in mergesort () #15 0xd81a4 in mergesort () #16 0x2b60 in ?? () #17 0x2a20 in ?? () (gdb) I'll be glad to do anything else to help. Jon On Mon, 14 Feb 2000, Chad Cunningham wrote:--- Andi Gutmans <andi@zend.com> http://www.zend.com/A backtrace would be helpful... Shut down apache and start it up with gdb /path/to/httpd run -X hit the page in your webserver, gdb will notice the segfault. Thentype btand submit the output as a bug report. On Sat, 12 Feb 2000, Jon Jensen wrote:Server, butI've gotten PHP 4.0b3 to work with Apache 1.3.11 on Mac OS XHat 6.1there's a mysterious bug. With the 'square' function example in the manual: function square ($num) { return $num * $num; } echo square(4); It works fine with PHP 3.0.12. But 4.0b3 crashes with a 'document contained no data' error to the browser. (I've tested it under RedOS Xand it works fine in both versions.) However, if I change the code to this: function square ($num) { $val = $num * $num; return $val; } echo square(4); It works fine. The only change I had to make to get PHP 4.0b3 to compile under Macsense andServer was to change line 232 of php.h from: #if (!HAVE_SNPRINTF) to #ifndef HAVE_SNPRINTF I don't know much about the C preprocessor, but it seems to makeneed for aanother guy who ported 3.0.11 did the same thing. However, maybe that's the problem. The original code causes a 'parse error', thus the-- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net For additional commands, e-mail: php4beta-help@lists.php.net To contact the list administrators, e-mail: php4beta-admin@lists.php.net -- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net For additional commands, e-mail: php4beta-help@lists.php.net To contact the list administrators, e-mail: php4beta-admin@lists.php.netchange. Does anyone know why that 'return' isn't working? These also fail: return "$j like $b"; return $j . $b; I've never used gdb (or any other debugger) but am willing to learn if it'll help. Jon Jensen-- Chad Cunningham ccunning@math.ohio-state.edu