From owner-freebsd-bugs@FreeBSD.ORG Wed Sep 8 10:50:26 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D66416A4CF for ; Wed, 8 Sep 2004 10:50:26 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00CE643D54 for ; Wed, 8 Sep 2004 10:50:26 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i88AoPA8073007 for ; Wed, 8 Sep 2004 10:50:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i88AoPOX073006; Wed, 8 Sep 2004 10:50:25 GMT (envelope-from gnats) Date: Wed, 8 Sep 2004 10:50:25 GMT Message-Id: <200409081050.i88AoPOX073006@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Ceri Davies Subject: Re: misc/71475: ACID (snort DB) detects versions incorrectly for PHP > v5.x X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Ceri Davies List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2004 10:50:26 -0000 The following reply was made to PR ports/71475; it has been noted by GNATS. From: Ceri Davies To: "David A. Koran" Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: misc/71475: ACID (snort DB) detects versions incorrectly for PHP > v5.x Date: Wed, 8 Sep 2004 11:47:19 +0100 On Tue, Sep 07, 2004 at 09:22:05PM +0000, David A. Koran wrote: > > >Description: > in "acid_db_common.php" the detection routines for PHP versions are incorrect and need to revised. > > > ----[section of code in question]---- > > function verify_php_build($DBtype) > /* Checks whether the necessary libraries is built into PHP */ > { > /* Check PHP version >= 4.0.4 */ > $current_php_version = phpversion(); > $version = explode(".", $current_php_version); > > /* account for x.x.xXX subversions possibly having text like 4.0.4pl1 */ > if ( is_numeric(substr($version[2], 1, 1)) ) > $version[2] = substr($version[2], 0, 2); > else > $version[2] = substr($version[2], 0, 1); > > /* only version PHP 4.0.4+ or 4.1+.* are valid */ > if ( !( ($version[0] >= 4) && ( ( ($version[1] == 0) && ($version[2] >= 4) ) || > ($version[1] > 0) ) ) ) > { > return "PHP ERROR: ". > "Incompatible version: Version ".$current_php_version. > " of PHP is too old. Please upgrade to version 4.0.4 or later"; > } > > >How-To-Repeat: > Try to configure ACID with a stock install of PHP5 on Apache 1.3 > >Fix: > I belive the problem lies within this comparison operator: > > if ( !( ($version[0] >= 4) && ( ( ($version[1] == 0) && ($version[2] >= 4) ) || > ($version[1] > 0) ) ) ) This sounds like a fault with the code of the application rather than FreeBSD; could you report it to the author of the software if that's the case? The fix will then get pulled in with the next update of the port. Ceri -- It is not tinfoil, it is my new skin. I am a robot.