From owner-freebsd-bugs@FreeBSD.ORG Tue Sep 7 21:30:17 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 9EF0416A4CF for ; Tue, 7 Sep 2004 21:30:17 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 742F943D1F for ; Tue, 7 Sep 2004 21:30:17 +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 i87LUHbZ066320 for ; Tue, 7 Sep 2004 21:30:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i87LUHXE066284; Tue, 7 Sep 2004 21:30:17 GMT (envelope-from gnats) Resent-Date: Tue, 7 Sep 2004 21:30:17 GMT Resent-Message-Id: <200409072130.i87LUHXE066284@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "David A. Koran" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E1C1216A4CE for ; Tue, 7 Sep 2004 21:22:07 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id D655543D2D for ; Tue, 7 Sep 2004 21:22:07 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i87LM5w6076816 for ; Tue, 7 Sep 2004 21:22:05 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i87LM5ag076815; Tue, 7 Sep 2004 21:22:05 GMT (envelope-from nobody) Message-Id: <200409072122.i87LM5ag076815@www.freebsd.org> Date: Tue, 7 Sep 2004 21:22:05 GMT From: "David A. Koran" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: 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 List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2004 21:30:17 -0000 >Number: 71475 >Category: misc >Synopsis: ACID (snort DB) detects versions incorrectly for PHP > v5.x >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 07 21:30:17 GMT 2004 >Closed-Date: >Last-Modified: >Originator: David A. Koran >Release: FreeBSD 4.10-STABLE #6: Sun Aug 29 12:49:29 EDT 2004 >Organization: SoundtrackNet, LLC >Environment: FreeBSD 4.10-STABLE #6: Sun Aug 29 12:49:29 EDT 2004 >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) ) ) ) >Release-Note: >Audit-Trail: >Unformatted: