php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18055 Stronghold 3 + PHP 4.2.1 incorrectly detects Apache2
Submitted: 2002-06-28 18:38 UTC Modified: 2002-06-28 19:57 UTC
From: ddr at gwis dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.2.1 OS: FreeBSD 4.5-R
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: ddr at gwis dot com
New email:
PHP Version: OS:

 

 [2002-06-28 18:38 UTC] ddr at gwis dot com
Running ./configure on php-4.2.1 with Stronghold 3 (build 3017, based on Apache 1.3.x) results in error message 

"checking for Apache 1.x module support via DSO through APXS... configure: error: Use --with-apxs2 with Apache 2.x!"

Stronghold 3 is NOT based on Apache 2.x.  Just for shits n giggles, I followed it's instructions (also installing pth), but that failed as well because of missing header files that are only found in Apache 2.x.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-28 19:13 UTC] ddr at gwis dot com
Apparently $APACHE_VERSION is coming back incorrectly during test..

  if test "$APACHE_VERSION" -ge 2000000; then
    { echo "configure: error: Use --with-apxs2 with Apache 2.x!" 1>&2; exit 1; }
  fi

Made version number test very large number to fake the test, configure completed without error.  Subsequent make and install completed without error.
 [2002-06-28 19:19 UTC] rasmus@php.net
Could you issue these two commands and let me know what it says, please?

httpd -v | head -1

and

httpd -v | head -1 | cut -f3 -d' ' | cut -f2 -d'/' | cut -f1 -d'-' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'

That second one is the actual command that PHP uses to turn the version number into something it can work with.  It looks like it is getting confused somewhere along the way.
 [2002-06-28 19:31 UTC] ddr at gwis dot com
unix-stage# ./httpd -v | head -1
Server version: Stronghold/3.0 Apache/1.3.22 RedHat/3017 (Unix)

unix-stage# ./httpd -v | head -1 | cut -f3 -d' ' | cut -f2 -d'/' | cut -f1 -d'-' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'
3000000

That's a million too many!  :-)
 [2002-06-28 19:43 UTC] rasmus@php.net
On a plain Jane Apache server this produces:

Server version: Apache/1.3.26 (Unix)
1003026

The PHP configure rule is picking up the 3.0 instead of the 1.3.22.  We'll have to fix that.  Changing sapi/apache/config.m4 to have cut -f4 instead of -f3 in the first cut command should fix it for you.  I'll come up with a general fix in a bit.
 [2002-06-28 19:57 UTC] rasmus@php.net
Fixed in CVS
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 09:00:02 2026 UTC