|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-07-19 14:57 UTC] quasi at di dot uoa dot gr
[2007-07-19 15:18 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 11:00:02 2025 UTC |
Description: ------------ commands like require('../somefile') fail although they didn't in versions prior to 5.2.0. This happens when the user running the command does not have 'r' rights to the directory of the included file. Bug #39351 seems related but it is supposedly closed. Reproduce code: --------------- cd tmp umask 022 mkdir d1 chmod 711 d1 cd d1 echo Included > fin.php mkdir d2 cd d2 echo '<? require("/tmp/d1/fin.php") ?>' > f.php echo '<? require("../fin.php") ?>' >> f.php php /tmp/d1/d2/f.php Expected result: ---------------- Included Included Actual result: -------------- Included Warning: require(../fin.php): failed to open stream: Permission denied in f.php on line 2 Fatal error: require(): Failed opening required '../fin.php' (include_path='.:/opt/php/lib/php') in f.php on line 2