php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22272 Segmentation Fault (11)
Submitted: 2003-02-18 08:38 UTC Modified: 2003-02-23 03:10 UTC
From: webmaster at cryptpad dot com Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.3.1 OS: RedHat 7.2
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: webmaster at cryptpad dot com
New email:
PHP Version: OS:

 

 [2003-02-18 08:38 UTC] webmaster at cryptpad dot com
Installed PHP as a DSO Module in Apache. Install went fine. Modified httpd.conf file to include LoadModule & AddType declarations, then stopped and started Apache.

Whenever I go to access a PHP page, it returns no data and puts the following into the apache error log:

[Tue Feb 18 14:13:34 2003] [notice] child pid 9320 exit signal Segmentation fault (11)

Doing a backtrace reveals the following:

(gdb) run -X
Starting program: /usr/local/apache/bin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x4040c5e6 in send_php (r=0x83fa594, display_source_mode=0, filename=0x0)
    at /install/php-4.3.1/sapi/apache/mod_php4.c:498
498			per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, 
&php4_module);
(gdb) bt
#0  0x4040c5e6 in send_php (r=0x83fa594, display_source_mode=0, filename=0x0)
    at /install/php-4.3.1/sapi/apache/mod_php4.c:498
#1  0x4040c80e in send_parsed_php (r=0x83fa594) at /install/php-4.3.1/sapi/apache/mod_php4.c:571
#2  0x080afea3 in ap_invoke_handler ()
#3  0x080c4f03 in ap_some_auth_required ()
#4  0x080c4f64 in ap_process_request ()
#5  0x080bbda1 in ap_child_terminate ()
#6  0x080bbf4c in ap_child_terminate ()
#7  0x080bc0c0 in ap_child_terminate ()
#8  0x080bc738 in ap_child_terminate ()
#9  0x080bcf9b in main ()
#10 0x40087657 in __libc_start_main (main=0x80bcbf4 <main>, argc=2, ubp_av=0xbffff9b4, 
    init=0x8065630 <_init>, fini=0x8172b40 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>, 
stack_end=0xbffff9ac)
    at ../sysdeps/generic/libc-start.c:129


/install/php-4.3.1/ is where I installed PHP from. Should it really be running the mod_php4.c file from there?

Can anyone help?

P.S. I also have a separate copy of apache running which is my ssl server. I tried to install PHP into that copy in the same way, and it worked fine!!

Both Apache versions are 1.3.27

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-18 18:05 UTC] iliaa@php.net
Do you set any PHP settings via virtual host or .htaccess, if so, what are they?
 [2003-02-19 04:02 UTC] webmaster at cryptpad dot com
No, None.
 [2003-02-19 04:13 UTC] sniper@php.net
What was the configure line used to configure PHP?

 [2003-02-19 04:16 UTC] webmaster at cryptpad dot com
Tried:

./configure --with-apxs=/usr/local/apache/bin/apxs

with and without --with-mysql
 [2003-02-19 15:51 UTC] michael dot mauch at gmx dot de
> /install/php-4.3.1/ is where I installed PHP from. Should it really be
> running the mod_php4.c file from there?

mod_php4.c is a C source file, it's not executed and only shown there for reference.

> P.S. I also have a separate copy of apache running which is my ssl
> server. I tried to install PHP into that copy in the same way, and it
> worked fine!!

Can you please make sure that the php.ini of your "bad" Apache references the correct extension_dir, i.e. the one that belongs to the same libphp4.so (LoadModule in httpd.conf)?
 [2003-02-20 04:33 UTC] webmaster at cryptpad dot com
Tried changing extension_dir to /usr/local/apache/libexec bit still nothing.
 [2003-02-20 07:30 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip


Although I don't think it matters, there's just something
freaky in your system..

Are you loading any extensions in the php.ini??
What's the diff -u between it and the php.ini-dist?

 [2003-02-21 04:16 UTC] webmaster at cryptpad dot com
Snapshot didn't work.

using the exact php.ini now, still same result. I tried making a symlink to php.ini in the libexec directory, but that didn't help.

A couple of other observations, if they help:
If I just put the LoadModule statement into apache config, without AddType statement, then it asks me to download the file, and it hasn't processed it. If I leave out the LoadModule statement and put in the AddType statement, I get the same problem as before (blank response).

Does that give any more clues?
 [2003-02-21 04:31 UTC] sniper@php.net
Why do you actually have two separate installs of 
apache...? As it can really run both SSL and non-SSL requests from same instance..

 [2003-02-21 04:37 UTC] webmaster at cryptpad dot com
I know,
The machine is a development machine, so I'm running them separately so I can test stuff out separately.

Anyway, does it matter? The two daemons should be independent of each other. PHP just isn't working on one of them.

P.S. I'm running AxKit (http://axkit.org) on the copy of Apache that's having the problems. Do you know of any interactions between AxKit and PHP?
 [2003-02-21 04:45 UTC] sniper@php.net
I have no idea what this axkit is, but what I'm interested 
in is that does PHP+Apache work if that thing is NOT there?

 [2003-02-21 04:52 UTC] webmaster at cryptpad dot com
It's a perl module.
I tried editing out all the AxKit lines in the Apache config, but that still didn't work, so I guess it isn't that.

Any other ideas? Surely I'm not the only person in the world to have this problem?
 [2003-02-21 05:38 UTC] msopacua@php.net
Could you first try to *not* load mod_perl and comment out any PerlModule directives.

If that works, try configuring php, with --without-xml.

As outlined in AxKit docs, does your Apache compile have the recommended --disable-rule=EXPAT option?


 [2003-02-21 07:06 UTC] sniper@php.net
Sometimes it's good idea to start from clean table..like in this case where you're the only one having the problem. :)

Get fresh sources of Apache 1.3.27, compile it with 
the DSO support, get fresh PHP 4.3.1 sources, and use that
plain simple configure line. 

And btw. Do you happen to have any modules in Apache that also use mysql? If so, you should propably try and configure using --with-myslq=/path/to/mysql/install/prefix


 [2003-02-21 10:40 UTC] webmaster at cryptpad dot com
Tried a clean install. Still didn't work.

Here's something else interesting: I tried to set up apache and php on my Windows machine instead, and when I tried to install it as a module, it just downloaded the files instead of parsing them, and when I tried installing it as a CGI program, I got a "Cannot find server or DNS error" page.

I am obviously congenitally incapable of installing PHP on anything. Either that or 4.3.1 doesn't work. Whatever it is, I think I've wasted far too much of my time trying to set the sodding thing up, so I think I'll just stick to using Perl.
 [2003-02-23 03:10 UTC] sniper@php.net
Okay.

 [2004-02-07 13:45 UTC] arnarb at oddi dot is
I'm having the exact same problem, both with php 4.3.4 and 4.3.5RC2. My Apache version is 1.3.23, and only standard DSO's are loaded.

php was in both cases configured with 
./configure --prefix=/usr --with-apxs=/usr/sbin/apxs

Here's what gdb gives me

(gdb) run -X
Starting program: /usr/sbin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x405bfc22 in send_php (r=0x80e88d4, display_source_mode=0, filename=0x0)
    at /usr/src/php-4.3.5RC2/sapi/apache/mod_php4.c:562
562                     per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, &php4_module);
(gdb) print per_dir_conf
$1 = (HashTable *) 0x21
(gdb) print r
$2 = (request_rec *) 0x80e88d4
(gdb) print r->per_dir_config
$3 = (void *) 0x0
(gdb) print &php4_module
$4 = (module *) 0x405fb000
(gdb) bt
#0  0x405bfc22 in send_php (r=0x80e88d4, display_source_mode=0, filename=0x0)
    at /usr/src/php-4.3.5RC2/sapi/apache/mod_php4.c:562
#1  0x405bfe72 in send_parsed_php (r=0x80e88d4)
    at /usr/src/php-4.3.5RC2/sapi/apache/mod_php4.c:635
#2  0x8054209 in ap_invoke_handler (r=0x80e88d4) at http_config.c:517
#3  0x806962f in process_request_internal (r=0x80e88d4) at http_request.c:1308
#4  0x8069696 in ap_process_request (r=0x80e88d4) at http_request.c:1324
#5  0x80603a0 in child_main (child_num_arg=0) at http_main.c:4565
#6  0x8060561 in make_child (s=0x8094364, slot=0, now=1076179775)
    at http_main.c:4669
#7  0x80606dc in startup_children (number_to_start=5) at http_main.c:4751
#8  0x8060d6d in standalone_main (argc=2, argv=0xbffff674) at http_main.c:5056
#9  0x80615cc in main (argc=2, argv=0xbffff674) at http_main.c:5401
#10 0x401832eb in __libc_start_main (main=0x8061238 <main>, argc=2,
    ubp_av=0xbffff674, init=0x804e240 <_init>, fini=0x807ef3c <_fini>,
    rtld_fini=0x4000c130 <_dl_fini>, stack_end=0xbffff66c)
    at ../sysdeps/generic/libc-start.c:129
 [2004-02-07 14:52 UTC] arnarb at oddi dot is
I tried compiling with "--without-xml" and it made no difference.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 02 06:01:28 2024 UTC