From owner-freebsd-ports Sat Oct 12 5:20: 6 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1509D37B401 for ; Sat, 12 Oct 2002 05:20:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 560E343EB7 for ; Sat, 12 Oct 2002 05:20:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g9CCK2Co083193 for ; Sat, 12 Oct 2002 05:20:02 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g9CCK2De083192; Sat, 12 Oct 2002 05:20:02 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 55D9537B401 for ; Sat, 12 Oct 2002 05:11:48 -0700 (PDT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C1F043EAC for ; Sat, 12 Oct 2002 05:11:48 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.6/8.12.6) with ESMTP id g9CCBg7R022979 for ; Sat, 12 Oct 2002 05:11:42 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.6/8.12.6/Submit) id g9CCBgdY022978; Sat, 12 Oct 2002 05:11:42 -0700 (PDT) Message-Id: <200210121211.g9CCBgdY022978@www.freebsd.org> Date: Sat, 12 Oct 2002 05:11:42 -0700 (PDT) From: "Eric A. Griff" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: ports/43970: mod_php4 4.2.3 release has a bug in relative paths using Apache2 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 43970 >Category: ports >Synopsis: mod_php4 4.2.3 release has a bug in relative paths using Apache2 >Confidential: no >Severity: critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 12 05:20:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Eric A. Griff >Release: 4.7-RC >Organization: setjmp Networks >Environment: FreeBSD sankofa.setjmp.net 4.7-RC FreeBSD 4.7-RC #0: Mon Oct 7 14:59:09 CDT 2002 root@sankofa.setjmp.net:/usr/src/sys/compile/SANKOFA i386 >Description: This is actually a bug with the original release of php4-4.2.3 that is specific to Apache 2. It involves relative paths to php functions such as file_exists() among other file access functions... Per the php.net site, the only suggestion is to update to later sources. Which didn't fit so well with ports :( php.net references: http://bugs.php.net/bug.php?id=19323 http://bugs.php.net/bug.php?id=19287 >How-To-Repeat: Run any php script that uses relative paths.. file_exists('./path/filename') where the file exists, will return that it doesn't. phpBB will find the error on almost anything except the forum homepage. I have about 10 different users running it.. That's where I discovered the problem. >Fix: I was able to download http://snaps.php.net/php4-STABLE-latest.tar.gz and then: 1) WITH_APACHE2=yes make extract in the php4 port. (selecting the options I wanted) 2) untgz the STABLE-latest, and then with some minor cmdline, mv the changed files into the work tree. (as shown below) 3) WITH_APACHE2=yes make package (everything worked fine, even all patches) root# cd /usr/ports/www/mod_php4 root# WITH_APACHE2=yes make extract root# fetch http://snaps.php.net/php4-STABLE-latest.tar.gz root# tar xzf php4-STABLE-latest.tar.gz root# cd php4-STABLE-200210120300/ #note, the date changes every 3 hrs. root# cat >doit.sh #!/bin/sh ^D root# diff -r -q ../work/php-4.2.3/ . | grep ^Files | awk '{printf "mv %s %s\n",$4,$2}' >>doit.sh root# chmod u+x doit.sh root# ./doit.sh root# cd .. root# WITH_APACHE2=yes make package The resulting install seems to work fine and still fits well in pkg_* >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message