php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40728 configure won't identify apache version
Submitted: 2007-03-05 14:34 UTC Modified: 2007-03-15 01:00 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (100.0%)
From: sheezes at gmail dot com Assigned:
Status: No Feedback Package: *Compile Issues
PHP Version: 5.2.1 OS: AIX 5.3
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sheezes at gmail dot com
New email:
PHP Version: OS:

 

 [2007-03-05 14:34 UTC] sheezes at gmail dot com
Description:
------------
Hello,
I have AIX 5.3 system and I'm running apache version 2.0.59 (latest on the 2.0.x series)
I'm trying to run and configure latest php with it but I'm running into a problem when the configure script needs to identify my apache version.
my configure line is simple: ./configure --with-apxs2=/usr/local/apache2/bin/apxs
The configure script says that I have apache 1.3 and should use --with-apx (drop the "2"). If I do that, the script run well but at the end I get a warning saying my apxs script is most likely broken and reffers me to the php faq. I read the faq but it didn't help.
I'm almost 100% sure the problem is with the configure script that identify my apache as 1.3 instead of 2.x


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-05 15:56 UTC] tony2001@php.net
What do you see in your config.log?
What do you get with these commands: 
echo `/usr/local/apache2/bin/apxs -q SBINDIR`/`/usr/local/apache2/bin/apxs -q TARGET`
/usr/local/apache2/bin/httpd -v 
?

 [2007-03-06 06:59 UTC] sheezes at gmail dot com
# / > echo `/usr/local/apache2/bin/apxs -q SBINDIR`/`/usr/local/apache2/bin/apxs -q TARGET` 
/usr/local/apache2/bin/httpd 

# / > /usr/local/apache2/bin/httpd -v 
Server version: Apache/2.0.59 
Server built:   Mar  5 2007 16:33:35
 [2007-03-06 10:50 UTC] tony2001@php.net
What do you see in your config.log?
 [2007-03-06 14:54 UTC] sheezes at gmail dot com
configure:105699: checking for executable suffix 
configure:105900: checking for c++ 
configure:105932: checking whether the C++ compiler (g++   -Wl,-brtl) works 
configure:105948: g++ -o conftest    -Wl,-brtl conftest.C  1>&5 
configure:105974: checking whether the C++ compiler (g++   -Wl,-brtl) is a cross-compiler 
configure:105979: checking whether we are using GNU C++ 
configure:106007: checking whether g++ accepts -g 
configure:106056: g++ -c -g -O2  conftest.C 1>&5 
configure:106073: g++ -c -g -O2  conftest.C 1>&5 
configure: In function 'int main()': 
configure:106069: error: 'exit' was not declared in this scope 
configure: failed program was: 
#line 106066 "configure" 
#include "confdefs.h" 
int main() { 
exit (42); 
; return 0; } 

configure:106056: g++ -c -g -O2  conftest.C 1>&5 
configure:106073: g++ -c -g -O2  conftest.C 1>&5 
configure:106095: checking how to run the C++ preprocessor 
configure:106144: checking the maximum length of command line arguments 
configure:106245: checking command to parse /usr/bin/nm -B output from gcc object 
configure:106434: checking for objdir 
configure:106500: checking for ar 
configure:106567: checking for ranlib 
configure:106634: checking for strip 
configure:106971: checking if gcc static flag  works 
configure:107021: checking if gcc supports -fno-rtti -fno-exceptions 
configure:107071: checking for gcc option to produce PIC 
configure:107341: checking if gcc supports -c -o file.o 
configure:107412: checking whether the gcc linker (/usr/bin/ld) supports shared libraries 

configure:107770: gcc -o conftest -I/usr/include -g -O2   -Wl,-brtl conftest.c  1>&5 
configure:108309: checking dynamic linker characteristics 
configure:108883: checking how to hardcode library paths into programs 
configure:108921: checking whether stripping libraries is possible 
configure:109506: checking if libtool supports shared libraries 
configure:109510: checking whether to build shared libraries 
configure:109533: checking whether to build static libraries 
configure:110202: checking for ld used by g++ 
configure:110274: checking if the linker (/usr/bin/ld) is GNU ld 
configure:110340: checking whether the g++ linker (/usr/bin/ld) supports shared libraries 
configure:110441: g++ -o conftest -g -O2   -Wl,-brtl conftest.cpp  1>&5 
configure:111180: g++ -c -g -O2  conftest.cpp 1>&5 
configure:111290: checking for g++ option to produce PIC 
configure:111624: checking if g++ supports -c -o file.o 
configure:111695: checking whether the g++ linker (/usr/bin/ld) supports shared libraries 
configure:111781: checking dynamic linker characteristics 
configure:112355: checking how to hardcode library paths into programs 
configure:112393: checking whether stripping libraries is possible
 [2007-03-06 14:55 UTC] sheezes at gmail dot com
it's the last 50 lines of the config log btw
 [2007-03-06 15:00 UTC] tony2001@php.net
Put your config.log somewhere.
 [2007-03-06 15:01 UTC] tony2001@php.net
And see bug #40638.
 [2007-03-06 15:09 UTC] sheezes at gmail dot com
http://rapidshare.com/files/19699014/config.rar.html
Sorry about rapidshare, I don't have any other place to put it
My server is in a private network without access to the internet
 [2007-03-06 15:20 UTC] tony2001@php.net
What exactly was you configure line and what exactly did you get? (copy/paste please).

What is the output of the command below?
`/usr/local/apache2/bin/apxs -q SBINDIR`/`/usr/local/apache2/bin/apxs -q TARGET` -v
 [2007-03-06 15:32 UTC] sheezes at gmail dot com
i already said my configure line on my 1st own.
quick remind: ./configure
--with-apxs=/usr/local/apache2/bin/apxs
read again my 1st post for more details


>`/usr/local/apache2/bin/apxs -q SBINDIR`/`/usr/local/apache2/bin/apxs -q TARGET` -v 
Server version: Apache/2.0.59 
Server built:   Mar  5 2007 16:33:35 




this is the output i get on my screen from the configure script:

Generating files 
creating ./config.status 
creating php5.spec 
creating main/build-defs.h 
creating scripts/phpize 
creating scripts/man1/phpize.1 
creating scripts/php-config 
creating scripts/man1/php-config.1 
creating sapi/cli/php.1 
creating main/php_config.h 
main/php_config.h is unchanged 
creating main/internal_functions.c 
creating main/internal_functions_cli.c 

+--------------------------------------------------------------------+ 
| WARNING: Your /usr/local/apache2/bin/apxs script is most likely broken. 
|                                                                    | 
| Please go read http://www.php.net/faq.build#faq.build.apxs         | 
| and make the changes described there and try again.                | 
+--------------------------------------------------------------------+ 
| License:                                                           | 
| This software is subject to the PHP License, available in this     | 
| distribution in the file LICENSE.  By continuing this installation | 
| process, you are bound by the terms of this license agreement.     | 
| If you do not agree with the terms of this license, you must abort | 
| the installation process at this point.                            | 
+--------------------------------------------------------------------+ 

Thank you for using PHP. 




and i want to thank you for your help till now :)
 [2007-03-06 15:42 UTC] tony2001@php.net
>--with-apxs=/usr/local/apache2/bin/apxs
That's clearly incorrect.
Use --with-apxs2=/usr/local/apache2/bin/apxs instead.

>read again my 1st post for more details
I did, that's why I asked you to copy/paste error messages instead of retelling.

>Server version: Apache/2.0.59 
>Server built:   Mar  5 2007 16:33:35 
Are you sure you're running ./configure in the same environment and under the same account?
As I've said your problem looks exactly like bug #40638.
 [2007-03-07 08:15 UTC] sheezes at gmail dot com
yea, i saw that bug report. I reported it actually
but this case is a bit diffrent. I decided to leave the other machine running aix 5.2 and IBMIHS (IBM's httpd) because the problem I reported.
Anyway, this machine is running AIX 5.3 and original apache 2.0.59 (not that IBM httpd modification) and this time I'm not getting exactly the same errors I got in the other machine (LIBPATH etc).

You saw the config.log? you saw anything unusual in it?
 [2007-03-07 08:26 UTC] tony2001@php.net
The other possible cause might be broken shell used in configure, though I haven't ever heard of such problems.
PHP uses this macro to extract Apache version:

  ac_output=`/path/to/httpd -v 2>&1 | grep version`
  ac_IFS=$IFS
IFS="- /.
"
  set $ac_output
  IFS=$ac_IFS

  APACHE_VERSION=`expr $4 \* 1000000 + $5 \* 1000 + $6`

Make sure it works for you.
 [2007-03-07 11:56 UTC] sheezes at gmail dot com
the APACHE_VERSION var value is 61 (added an echo and an exit command on the configure script). I added 2000000 to the expresion and now I managed to run configure with the apxs2 option that I couldn't before! Well, it runs fine and even compiling the libphp5.so file! It's a great progress but I'm not sure the compilation is 100% working :/ When I try to start apache it quits and dump a core file. When I remove the PHP AddModule statement from the httpd.conf, apache is fine again :/
 [2007-03-07 12:02 UTC] tony2001@php.net
> I added 2000000 to the expresion
This shouldn't be required.
What kind of shell are you using? I mean /bin/sh.

>When I try to start apache it quits and dump a core file.
A GDB backtrace would tell why.
http://bugs.php.net/bugs-generating-backtrace.php
 [2007-03-07 13:18 UTC] sheezes at gmail dot com
Finally I can say.....WORKING :D
I forgot that on the last compile I changed something on the apxs script. Well, I changed it back and run the configure and make commands and now the libphp5.so is working and not crashing my apache server! 

If someone has the same problems as I have, add to the APACHE_VERSION expression 2000000 (on the php configure script) and then the script won't crash saying the apache version is 1.3 and should use normal apxs instead of the apxs2. 

I think the PHP team should look into that bug, as you said, it should discover my version alone without those changes

and thanks for your help Tony! :)
 [2007-03-07 13:30 UTC] tony2001@php.net
>I think the PHP team should look into that bug
PHP team IS looking into the bug, but we can't fix it without your answers.

What kind of shell are you using? I mean /bin/sh - what is it?
 [2007-03-07 14:38 UTC] sheezes at gmail dot com
my shell is tcsh
but before solving the problem i tried working with the csh env as well
 [2007-03-07 14:51 UTC] tony2001@php.net
>my shell is tcsh
your shell or /bin/sh ?

>but before solving the problem i tried working with the csh env as well
does that mean you tried to change /bin/sh to csh?
 [2007-03-15 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC