php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9079 PHP seg faults in alloca() at first PHP request to Apache
Submitted: 2001-02-02 11:48 UTC Modified: 2001-02-09 15:08 UTC
From: mchampagne at capis dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.4pl1 OS: AIX 4.3.3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mchampagne at capis dot com
New email:
PHP Version: OS:

 

 [2001-02-02 11:48 UTC] mchampagne at capis dot com
We are running Oracle IAS 1.0.0.0 on AIX 4.3.3.  Oracle's IAS runs Apache 1.3.9 and the root Apache directory is in /ias/Apache/Apache.  We have a soft link from /usr/local/apache -> /ias/Apache.  We are installing our PHP source from /usr/tools/src/php-4.0.4pl1/ and I believe the config script uses /usr/local as it's prefix?  We ran make and make install and we bring up Apache with mod_php successfully.  At the first request however, php cores in the /ias/Apache/Apache directory.  The request is simply running phpinfo().  I see the following message in our httpds_error_log:

[Fri Feb  2 11:26:34 2001] [notice] Apache/1.3.9 (Unix) PHP/4.0.4pl1 mod_perl/1.21 ApacheJServ/1.1 configured --
 resuming normal operations
[Fri Feb  2 11:26:58 2001] [notice] child pid 17026 exit signal Segmentation fault (11)

Here's what I see in the core file:

Segmentation fault in sig_coredump at 0x10003824
0x10003824 (sig_coredump+0x3c) 80410014          l   r2,0x14(r1)

(dbx) where
sig_coredump(0xb) at 0x10003824
alloca() at 0xd36ccef8
php_execute_script(0x2ff22530), line 1181 in "main.c"
apache_php_module_main(0x20255e30, 0x0), line 89 in "sapi_apache.c"
send_php(0x20255e30, 0x0, 0x20257dc0), line 516 in "mod_php4.c"
send_parsed_php(0x20255e30), line 527 in "mod_php4.c"
ap_invoke_handler(0x20255e30) at 0x100c3138
process_request_internal(0x20255e30) at 0x100edf8c
ap_process_request(0x20255e30) at 0x100ef4f8
child_main(0x0) at 0x10002058
make_child(0x2004ed20, 0x0, 0x3a7adfba) at 0x10001a18
startup_children(0x5) at 0x10001804
standalone_main(0x3, 0x2ff229e8) at 0x10000d24
http_main.main(0x3, 0x2ff229e8) at 0x100008c8

Our configure scripts is run with:
configure --with-apxs=/ias/Apache/Apache/bin/apxs --with-oci8=/ias/6iserver --without-mysql

We also made the modification to libtool in bug 4360 and tried again but we get the same as above.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-08 11:46 UTC] mchampagne at capis dot com
Do you guys have any ideas what this is?  I can keep trying different things on this but I don't have a direction.  We are desperate to run PHP.  I did try installing to our actual Apache directory instead of soft linking /usr/local and we came up with the same thing.

Mike

 [2001-02-08 14:16 UTC] mchampagne at capis dot com
I see this snippet in my config.log where it's not finding alloca.h.  I did not find alloca.h in the PHP source tree or anywhere on my system.

configure:5777: checking for alloca.h
configure:5787: cc -E  -DAIX=43 -DMOD_SSL=204110 -DEAPI -DUSE_EXPAT conftest.c >/dev/null 2>conftest.out
"configure", line 5783.10: 1506-296 (S) #include file <alloca.h> not found.
configure: failed program was:
#line 5782 "configure"
#include "confdefs.h"
#include <alloca.h>
configure:5777: checking for arpa/inet.h
configure:5787: cc -E  -DAIX=43 -DMOD_SSL=204110 -DEAPI -DUSE_EXPAT conftest.c >/dev/null 2>conftest.out
configure:5777: checking for crypt.h
 [2001-02-08 14:32 UTC] mchampagne at capis dot com
I see this snippet in my config.log where it's not finding alloca.h.  I did not find alloca.h in the PHP source tree or anywhere on my system.

configure:5777: checking for alloca.h
configure:5787: cc -E  -DAIX=43 -DMOD_SSL=204110 -DEAPI -DUSE_EXPAT conftest.c >/dev/null 2>conftest.out
"configure", line 5783.10: 1506-296 (S) #include file <alloca.h> not found.
configure: failed program was:
#line 5782 "configure"
#include "confdefs.h"
#include <alloca.h>
configure:5777: checking for arpa/inet.h
configure:5787: cc -E  -DAIX=43 -DMOD_SSL=204110 -DEAPI -DUSE_EXPAT conftest.c >/dev/null 2>conftest.out
configure:5777: checking for crypt.h
 [2001-02-09 15:08 UTC] mchampagne at capis dot com
We undefined HAS_ALLOCA from all the makefiles, recompiled and this fixed our problem.  One of our compiler gurus here says we could add '-ma' to the compiler flags to get around this problem.  AIX 4.3.3 apparently does not have alloca() and the PHP configure script thinks it does.

Mike

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 10:01:29 2025 UTC