php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17045 Apache 2.0.35 + PHP4.2.0 segfault on start
Submitted: 2002-05-06 12:45 UTC Modified: 2002-05-07 12:42 UTC
From: tonic at nondot dot org Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4.2.0 OS: Mandrake Linux 8.2 (2.4.18)
Private report: No CVE-ID: None
 [2002-05-06 12:45 UTC] tonic at nondot dot org
Problem: Apache 2.0.35 segfaults when loading PHP module. If LoadModule is commented out, Apache works fine.

To Reproduce: Follow instructions in PHP manual to install PHP and Apache 2.0. Once Apache is configured and everything is installed, run httpd. Httpd will appear to have started normally, but on doing a 'ps -aux | grep httpd' you will notice NO httpd processes, and there is no httpd.pid file. Even using 'apachectrl start', will report httpd started fine. 
Use 'httpd -X' to see segfault message.

Module Line:
LoadModule php4_module        modules/libphp4.so

GDB Backtrace:
(gdb) run -X
Starting program: /usr/local/apache/conf/../bin/httpd -X
[New Thread 1024 (LWP 27916)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 27916)]
0x40329991 in ts_resource_ex (id=1, th_id=0x0) at TSRM.c:310
310
TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id,
thread_resources->count);
(gdb) bt
#0  0x40329991 in ts_resource_ex (id=1, th_id=0x0) at TSRM.c:310
#1  0x40291b0a in php_module_startup (sf=0x4034f6a0) at main.c:856
#2  0x4028f7ec in php_apache_server_startup (pconf=0x80b6380,
plog=0x80ee460,
    ptemp=0x8140b70, s=0x81431d8) at sapi_apache2.c:442
#3  0x0807baa3 in ap_run_post_config (pconf=0x80b6380, plog=0x80ee460,
    ptemp=0x8140b70, s=0x81431d8) at config.c:127
#4  0x08080908 in main (argc=2, argv=0xbffff834) at main.c:611
#5  0x40118280 in __libc_start_main () from /lib/libc.so.6


Please let me know what other information I can supply to help. My apologizes if this bug is already reported, I spent a good deal of time searching the bug list.

-Tanya


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-06 13:18 UTC] derick@php.net
Can you try 4.2.1rc2 when it's released later today?

Derick
 [2002-05-06 13:21 UTC] tonic at nondot dot org
yes I can. Will I need to get this from cvs or will you be putting up a tar ball on php.net?

Thanks,
Tanya
 [2002-05-06 13:23 UTC] derick@php.net
A tarball will be published later (@ www.php.net/~derick)

Derick
 [2002-05-06 15:41 UTC] tonic at nondot dot org
Ok. I snagged it from the site you mentioned. Here is what I am noticing:

1) Using apachectrl will cause the same symptoms to occur.
(no HTTPD processes exist)

2) In addition, if you use apachectrl to start it (remember no processes are seen), then try running httpd.. I get this error:
[root@nondot bin]# ./apachectl start
./apachectl start: httpd started
[root@nondot bin]# ./httpd
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down

3) Ok.. so lets skip apachectrl and just use httpd. It successfuly starts httpd and I see processes!! But, now I am getting this in my apache error log:
[Mon May 06 14:31:04 2002] [crit] [client 62.23.37.61] (13)Permission denied: /home/httpd/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readble.

I do not have an .htaccess file, and I believe there was a bug similar to this awhile back?

Any help is appreciated.. and if you need anything.. just ask :)

Thanks,
Tanya
 [2002-05-06 16:35 UTC] tonic at nondot dot org
I think the last observation regarding .htaccess is an Apache bug (or maybe a feature?!?). 

Thanks,
Tanya
 [2002-05-07 12:42 UTC] tonic at nondot dot org
Ok. I think everything is fine.. so looks like this bug is fixed.

Thanks.

-Tanya
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 02:02:52 2024 UTC