php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23657 loading browscap.ini crashes apache
Submitted: 2003-05-16 04:11 UTC Modified: 2003-05-16 10:14 UTC
From: katana at katana-inc dot com Assigned:
Status: Closed Package: PHP options/info functions
PHP Version: 4.3.2RC3 OS: Linux Redhat 6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: katana at katana-inc dot com
New email:
PHP Version: OS:

 

 [2003-05-16 04:11 UTC] katana at katana-inc dot com
Apache crashes on startup. I just add the correct path to browscap.ini in php.ini, run configtest and i get a segmentation fault. I get the same error when starting httpd manually. Unfortunatelly i don't have time enough at the moment to recompile php as debug build...

Here is my config line:
'./configure' '--prefix=/usr/local' '--with-apache=/root/Apachetoolbox-1.5.64/apache_1.3.27' '--enable-exif' '--enable-track-vars' '--with-calendar=shared' '--enable-magic-quotes' '--enable-trans-sid' '--enable-wddx' '--enable-ftp' '--enable-inline-optimization' '--enable-memory-limit' '--with-zlib' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-zlib-dir=/usr' '--with-iconv' '--with-mhash=/usr/local' '--with-mcrypt=/usr/local' '--with-openssl=/usr/local/ssl' '--with-curl=/usr/local' '--enable-bcmath' '--with-gettext=/usr' '--with-mysql=/usr/local' '--with-mnogosearch=/usr/local/mnogosearch' 

I also have XDebug 1.2.0 loaded.

browscap.ini: Last updated 2003 May 13, Tuesday 11:42:27 PM GMT.

Oh, and it was working correctly with the same browscap.ini with 4.3.2-RC2 and the same setup.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-16 04:17 UTC] magnus@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2003-05-16 04:36 UTC] derick@php.net
Please unload Xdebug too if you report bugs
 [2003-05-16 04:37 UTC] katana at katana-inc dot com
Yes, I've read the document... however it looks like no coredump file is generated. And I can't use the httpd -X method since apache crashes on startup. Any clue ? If it's necessary I can have PHP recompiled as a debug build...
ok, i'll do that.
 [2003-05-16 05:10 UTC] katana at katana-inc dot com
OK, PHP has been recompiled as a debug build, XDebug is not loaded, and here is what i get:

[root@dante bin]# ./httpd
[Fri May 16 12:06:19 2003]  Script:  '-'
---------------------------------------
Zend/zend_language_scanner.c(2945) : Block 0xBFFFB5A4 status:
Beginning:      Overrun (magic=0x0000000D, expected=0x7312F8DC)
      End:      Unknown
---------------------------------------
[Fri May 16 12:06:19 2003]  Script:  '-'
---------------------------------------
Zend/zend_language_scanner.c(2949) : Block 0x08395F3C status:
Beginning:      Overrun (magic=0x00000000, expected=0x7312F8DC)
      End:      Unknown
---------------------------------------

When browscap is not loaded, there is no error.
I get the same output while running httpd in single mode from DBG.
 [2003-05-16 09:34 UTC] michael dot mauch at gmx dot de
Same here (4.3.2RC3 cli).

#0  0x0820df00 in _efree (ptr=0x4, 
    __zend_filename=0x82f6694 "Zend/zend_language_scanner.c", __zend_lineno=2945, 
    __zend_orig_filename=0x0, __zend_orig_lineno=0)
    at /usr/local/src/php-4.3.2RC3/Zend/zend_alloc.c:241
241		CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p->size);
(gdb) bt
#0  0x0820df00 in _efree (ptr=0x4, 
    __zend_filename=0x82f6694 "Zend/zend_language_scanner.c", __zend_lineno=2945, 
    __zend_orig_filename=0x0, __zend_orig_lineno=0)
    at /usr/local/src/php-4.3.2RC3/Zend/zend_alloc.c:241
#1  0x082047e0 in zend_file_handle_dtor (fh=<incomplete type>)
    at Zend/zend_language_scanner.c:2945
#2  0x0820b525 in zend_parse_ini_file (fh=<incomplete type>, 
    unbuffered_errors=1 '\001', ini_parser_cb=0x8143d88 <php_browscap_parser_cb>, 
    arg=0x836b3e0) at Zend/zend_ini_parser.c:185
#3  0x081440ca in zm_startup_browscap (type=1, module_number=7)
    at /usr/local/src/php-4.3.2RC3/ext/standard/browscap.c:166
#4  0x0813c652 in zm_startup_basic (type=1, module_number=7)
    at /usr/local/src/php-4.3.2RC3/ext/standard/basic_functions.c:1026
#5  0x08226e0f in zend_startup_module (module=0x833e5a0)
    at /usr/local/src/php-4.3.2RC3/Zend/zend_API.c:1005
#6  0x081e5506 in php_startup_extensions (ptr=0x8348248, count=28)
    at /usr/local/src/php-4.3.2RC3/main/main.c:1048
#7  0x08240149 in php_startup_internal_extensions ()
    at main/internal_functions_cli.c:105
#8  0x081e5aa5 in php_module_startup (sf=0x83481a0, additional_modules=0x0, 
    num_additional_modules=0) at /usr/local/src/php-4.3.2RC3/main/main.c:1216
#9  0x0823edb8 in main (argc=1, argv=0xbfffe904)
    at /usr/local/src/php-4.3.2RC3/sapi/cli/php_cli.c:516
#10 0x4075d8c1 in __libc_start_main (main=0x823ec64 <main>, argc=1, argv=0xbfffe904, 
    init=0x80899e4 <_init>, fini=0x82bd3c4 <_fini>, rtld_fini=0x4000a914 <_dl_fini>, 
    stack_end=0xbfffe8fc) at ../sysdeps/generic/libc-start.c:92
 [2003-05-16 09:47 UTC] sniper@php.net
Exactly what browscap.ini are you using? 

 [2003-05-16 09:49 UTC] sniper@php.net
Nevermind, I get the same segfault.

 [2003-05-16 10:14 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 13:01:28 2024 UTC