php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11996 seg fault viewing php w/ Apache 1.3.20
Submitted: 2001-07-09 22:41 UTC Modified: 2001-08-20 11:30 UTC
From: awu at yottayotta dot com Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 4.0.6 OS: Redhat 6.2 - kernel 2.2.16smp
Private report: No CVE-ID: None
 [2001-07-09 22:41 UTC] awu at yottayotta dot com
script
------
apachectl start
lynx http://localhost/phpinfo.php
tail error_log

apache error_log
----------------
[notice] child pid 31197 exit signal Segmentation fault (11)

configure script
----------------
"./configure" \
"--prefix=/opt/php" \
"--with-apxs=/opt/apache/bin/apxs" \
"--with-mysql=/opt/mysql" \
"--with-pgsql=/opt/pgsql" \
"--enable-track-vars" \
"--with-config-file-path=/opt/php" \

httpd -l
--------
Compiled-in modules:
  http_core.c
  mod_env.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_status.c
  mod_include.c
  mod_autoindex.c
  mod_dir.c
  mod_cgi.c
  mod_asis.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_access.c
  mod_auth.c
  mod_so.c
  mod_setenvif.c
  mod_perl.c
suexec: disabled; invalid wrapper /opt/apache/bin/suexec

httpd -V
--------
Server version: Apache/1.3.20 (Unix)
Server built:   Jun 21 2001 15:19:15
Server's Module Magic Number: 19990320:10
Server compiled with....
 -D HAVE_MMAP
 -D HAVE_SHMGET
 -D USE_SHMGET_SCOREBOARD
 -D USE_MMAP_FILES
 -D USE_SYSVSEM_SERIALIZED_ACCEPT
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D HTTPD_ROOT="/opt/apache"
 -D SUEXEC_BIN="/opt/apache/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/httpd.scoreboard"
 -D DEFAULT_LOCKFILE="logs/httpd.lock"
 -D DEFAULT_XFERLOG="logs/access_log"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
 -D ACCESS_CONFIG_FILE="conf/access.conf"
 -D RESOURCE_CONFIG_FILE="conf/srm.conf"

gdb backtrace
-------------
[root@forge php-4.0.6]# gdb httpd
GNU gdb 5.0
Copyright 2000 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
Starting program: /opt/bin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x4037ee6a in send_php (r=0x824d7cc, display_source_mode=0, filename=0x0) at mod_php4.c:478
478             per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, &php4_module);
(gdb) bt
#0  0x4037ee6a in send_php (r=0x824d7cc, display_source_mode=0, filename=0x0) at mod_php4.c:478
#1  0x4037efca in send_parsed_php (r=0x824d7cc) at mod_php4.c:547
#2  0x8099a4d in ap_invoke_handler ()
#3  0x80ae2f3 in process_request_internal ()
#4  0x80ae729 in ap_internal_redirect ()
#5  0x8074a1a in handle_dir ()
#6  0x8099a4d in ap_invoke_handler ()
#7  0x80ae2f3 in process_request_internal ()
#8  0x80ae354 in ap_process_request ()
#9  0x80a54f9 in child_main ()
#10 0x80a56a4 in make_child ()
#11 0x80a5814 in startup_children ()
#12 0x80a5e61 in standalone_main ()
#13 0x80a66a3 in main ()
#14 0x400a0b5c in __libc_start_main (main=0x80a62fc <main>, argc=2, ubp_av=0xbffffb14,
    init=0x80627b4 <_init>, fini=0x8148bfc <_fini>, rtld_fini=0x4000d634 <_dl_fini>, stack_end=0xbffffb0c)
    at ../sysdeps/generic/libc-start.c:129

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-12 13:24 UTC] awu at yottayotta dot com
Here's a display of the variables involved at the crash point.

(gdb) display r
1: r = (request_rec *) 0x824aa64
(gdb) display r->per_dir_config
2: r->per_dir_config = (void *) 0x0
(gdb) display php4_module
3: php4_module = {version = 19990320, minor_version = 10, module_index = 20, name = 0x40458261 "mod_php4.c",
  dynamic_load_handle = 0x8236108, next = 0x8170e80, magic = 1095774515, init = 0x4039ccc8 <php_init_handler>,
  create_dir_config = 0x4039c8a4 <php_create_dir>, merge_dir_config = 0x4039c90c <php_merge_dir>, create_server_config = 0,
  merge_server_config = 0, cmds = 0x4046a4b8, handlers = 0x4046a498, translate_handler = 0, ap_check_user_id = 0,
  auth_checker = 0, access_checker = 0, type_checker = 0, fixer_upper = 0, logger = 0, header_parser = 0, child_init = 0,
  child_exit = 0x4039cc98 <php_child_exit_handler>, post_read_request = 0}

 [2001-08-19 04:45 UTC] sniper@php.net
And the example script which causes this is where?
Or does this happen with any script?
Do you have some .htaccess file there?

--Jani

 [2001-08-20 10:44 UTC] awu at yottayotta dot com
It happens with *any* php script -- even something as simple as

<?php
phpinfo();
?>

I recompiled php as a static Apache module and everything works fine now.
 [2001-08-20 11:30 UTC] sniper@php.net
As everything works now, I'll close this. 

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 03:01:32 2024 UTC