Bug #18055 Updated: Stronghold 3 + PHP 4.2.1 incorrectly detects Apache2

From: Date: Fri, 28 Jun 2002 23:57:36 +0000
Subject: Bug #18055 Updated: Stronghold 3 + PHP 4.2.1 incorrectly detects Apache2
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12462@lists.php.net to get a copy of this message
ID: 18055 Updated by: rasmus@php.net Reported By: ddr@gwis.com -Status: Open +Status: Closed Bug Type: Compile Failure Operating System: FreeBSD 4.5-R PHP Version: 4.2.1 New Comment: Fixed in CVS Previous Comments: ------------------------------------------------------------------------ [2002-06-28 19:43:24] 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:31:26] ddr@gwis.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:19:03] 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:13:11] ddr@gwis.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 18:38:43] ddr@gwis.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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18055&edit=1

« previous php.bugs (#12462) next »