Subject: pkg/36916: php5 include od type ../foo.php fails
To: None <,,>
From: None <tobi@byte23.dew>
List: pkgsrc-bugs
Date: 09/05/2007 13:00:01
>Number:         36916
>Category:       pkg
>Synopsis:       php5 include od type ../foo.php fails
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 05 13:00:00 +0000 2007
>Originator:     Tobias N. Sasse
>Release:        3.1 Stable
Byte23 Networks
NetBSD gabriel 3.1 NetBSD 3.1 (GENERIC) #0: Tue Oct 31 04:27:07 UTC 2006 i386
Hi Folks,

it's the second time that this error occurs. First time was after upgrading php5 to version 5.2.3, now the same with version 5.2.4.

First of all: All configuration of php is set to default values, and I've checked all file permissions etc twice.

The Problem: I installed lang/php5, www/ap-php by pkgsrc (make install). After restarting the apache, every include/require in ALL php scripts produces an error like this:

Warning: require(../includeme.php) [function.require]: failed to open stream: Permission denied in /var/www/subdir/foo.php on line X

Fatal error: require() [function.require]: Failed opening required '../includeme.php' (include_path='.:') in /var/www/subdir/foo.php on line X

So you can see that a script in a subdirectory can't include another script from the basedirectory.

Again: I did not change the default config.

Last time the error occured an update of php5 solved the problem... So I hope you will find the error soon and supply a patch!

If you want to see some output of phpinfo() go for:

Hopefully somebody can help!

With regards to your work and greetings from Germany,

cd /usr/pkgsrc/www/apache22 && make install
cd /usr/pkgsrc/lang/php5 && make install
cd /usr/pkgsrc/www/ap-php && make install

Try to include something from an upper directory.