#46395 [Opn->Fbk]: Inconsistent behaviour of require_once
| From: | jani@php.net | Date: | Wed, 21 Jan 2009 19:48:00 +0000 |
| Subject: | #46395 [Opn->Fbk]: Inconsistent behaviour of require_once | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-133126@lists.php.net to get a copy of this message | ||
ID: 46395
Updated by: jani@php.net
Reported By: ebosman at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Directory function related
Operating System: Linux
PHP Version: 5.2.6
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2008-12-09 20:30:36] tomas at matfyz dot cz
Note that my bug #46801 was marked as a duplicate of this one. My
testcase could be found here:
http://tomas.matfyz.cz/obs/pok_require_dirs3/report/www/use.php
------------------------------------------------------------------------
[2008-11-24 17:33:18] ebosman at gmail dot com
And then I forgot that I put the original include_path back, apologies
/var/www/bug/top.php /var/www/bug
/var/www/bug/subdir/sub.inc /var/www/bug
(and htmlized:)
Warning: require_once(../top1.inc) [function.require-once]: failed to
open stream: No such file or directory in /var/www/bug/subdir/sub.inc on
line 1
Fatal error: require_once() [function.require]: Failed opening required
'../top1.inc' (include_path='/usr/share/php:/usr/share/pear') in
/var/www/bug/subdir/sub.inc on line 1
------------------------------------------------------------------------
[2008-11-24 17:30:28] ebosman at gmail dot com
correction, for top.php it should be (still no difference):
/var/www/bug/top.php /var/www/bug
/var/www/bug/subdir/sub.inc /var/www/bug
(and htmlized)
Warning: require_once(../top1.inc) [function.require-once]: failed to
open stream: No such file or directory in /var/www/bug/subdir/sub.inc on
line 1
Fatal error: require_once() [function.require]: Failed opening required
'../top1.inc' (include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/bug/subdir/sub.inc on line 1
(line difference in the previous comment was because of copy-pasting)
------------------------------------------------------------------------
[2008-11-24 17:15:22] ebosman at gmail dot com
Same result:
subdir/sub.php:
/var/www/bug/subdir/sub.php /var/www/bug/subdir
/var/www/bug/subdir/sub.inc /var/www/bug/subdir
/var/www/bug/top1.inc /var/www/bug/subdir
/var/www/bug/top2.inc /var/www/bug/subdir
top.php:
Warning: require_once(../top1.inc) [function.require-once]: failed to
open stream: No such file or directory in /var/www/bug/subdir/sub.inc on
line 2
Fatal error: require_once() [function.require]: Failed opening required
'../top1.inc' (include_path='/usr/share/php:/usr/share/pear') in
/var/www/bug/subdir/sub.inc on line 2
------------------------------------------------------------------------
[2008-11-24 09:52:56] jani@php.net
Try removing the . from your include_path setting.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/46395
--
Edit this bug report at http://bugs.php.net/?id=46395&edit=1