Re: [PHP4BETA] Is get_browser broken in PHP4-beta3?

From: Date: Tue, 18 Jan 2000 07:18:53 +0000
Subject: Re: [PHP4BETA] Is get_browser broken in PHP4-beta3?
References: 1 2 3  Groups: php.version4 
Request: Send a blank email to php-version4+get-9216@lists.php.net to get a copy of this message
Lars Torben Wilson writes: > Andi Gutmans writes: > > What regex are you using? Probably your PHP regex is conflicting with the > > Apache one. Try using configure's --with-system-regex switch. > > > > Andi > > > > On 17 Jan 2000 cpliu@das.com.hk wrote: > > > > > Hi, > > > > > > I am plainning to upgrade my web server to use php4. > > > During testing the existing php3 scripts using php4, a call to > > > get_browser() core dumped the process. > > > > > > Is there any way to work around this problem? > > > > > > Regards, > > > > > > Steven > > I'm going to try to recompile with that and see what happens, but > for me everything else works fine except for a segfault in t > get_browser(); always has. I've never had a version of PHP3 that had > this problem (that I knew of), but PHP4 has always had it for me. OK, when I recompile a fresh cvs of PHP4 using --with-system-regex, I still get a segfault. Here's the backtrace: ================================================================= /etc/apache/bin shanna% gdb httpd-php4 GNU gdb 4.17.0.4 with Linux/x86 hardware watchpoint and FPU support 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"... (gdb) run -X -f /etc/apache/conf/httpd.conf Starting program: /etc/apache/bin/httpd-php4 -X -f /etc/apache/conf/httpd.conf Program received signal SIGSEGV, Segmentation fault. _zend_is_inconsistent (ht=0x0, file=0x80f6ff0 "zend_hash.c", line=765) at zend_hash.c:66 zend_hash.c:66: No such file or directory. (gdb) bt #0 _zend_is_inconsistent (ht=0x0, file=0x80f6ff0 "zend_hash.c", line=765) at zend_hash.c:66 #1 0x80772f7 in zend_hash_copy (target=0x82464d0, source=0x0, pCopyConstructor=0x8072934 <zval_add_ref>, tmp=0xbffff6a4, size=4) at zend_hash.c:765 #2 0x8072a97 in _zval_copy_ctor (zvalue=0x82490e0, __zend_filename=0x810581f "browscap.c", __zend_lineno=106) at zend_variables.c:150 #3 0x8098e7f in php_if_get_browser (ht=1, return_value=0x82490e0, list=0x81508e4, plist=0x8150914, this_ptr=0x0, return_value_used=1) at browscap.c:106 #4 0x80c8b81 in execute (op_array=0x8244658) at ./zend_execute.c:1525 #5 0x8062deb in php_execute_script (primary_file=0xbffff9c8) at main.c:1243 #6 0x807e6e5 in apache_php_module_main (r=0x8241a14, fd=39, display_source_mode=0) at sapi_apache.c:86 #7 0x806142b in send_php (r=0x8241a14, display_source_mode=0, filename=0x824246c "/home/torben/public_html/php3test/browscap.html") at mod_php4.c:370 #8 0x806145f in send_parsed_php (r=0x8241a14) at mod_php4.c:382 #9 0x80d243a in ap_invoke_handler (r=0x8241a14) at http_config.c:508 #10 0x80df305 in process_request_internal (r=0x8241a14) at http_request.c:1212 #11 0x80df353 in ap_process_request (r=0x8241a14) at http_request.c:1228 #12 0x80d9978 in child_main (child_num_arg=0) at http_main.c:3851 #13 0x80d9aa3 in make_child (s=0x8157764, slot=0, now=948179546) at http_main.c:3923 #14 0x80d9b9b in startup_children (number_to_start=5) at http_main.c:4003 #15 0x80da02b in standalone_main (argc=4, argv=0xbffffb74) at http_main.c:4290 #16 0x80da6cd in main (argc=4, argv=0xbffffb74) at http_main.c:4591 (gdb) quit The program is running. Exit anyway? (y or n) y /etc/apache/bin shanna% ================================================================= PHP 3.0.13 works fine. -- +----------------------------------------------------------------+ |Torben Wilson <torben@php.net> Netmill iTech| |http://www.coastnet.com/~torben http://www.netmill.fi| |Ph: 1 250 383-9735 torben@netmill.fi| +----------------------------------------------------------------+

« previous php.version4 (#9216) next »