Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Oct 2002 05:11:42 -0700 (PDT)
From:      "Eric A. Griff" <eric@talesfromthereal.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/43970: mod_php4 4.2.3 release has a bug in relative paths using Apache2
Message-ID:  <200210121211.g9CCBgdY022978@www.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210121211.g9CCBgdY022978>