#36673 [NEW]: include fails without reason

From: Date: Thu, 09 Mar 2006 17:51:56 +0000
Subject: #36673 [NEW]: include fails without reason
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-94103@lists.php.net to get a copy of this message
From: edoardo at serra dot to dot it Operating system: Linux 2.6 (FC4) PHP version: 5.1.2 PHP Bug Type: Filesystem function related Bug description: include fails without reason Description: ------------ I have a web application needing write permissions on a directory. I decided to recursively chown that directory to nobody (the user the webserver is running as) As I chown 'chown -R nobody layout/' I get: Warning: include(layout/theme.php) [function.include]: failed to open stream: No such file or directory in /......./html/header.php on line 35 Warning: include() [function.include]: Failed opening 'layout/theme.php' for inclusion (include_path='.:/usr/local/lib/php') in /......./html/header.php on line 35 line 35 is: include("layout/theme.php"); Needless to say the file is existent # ll layout/theme.php -rw-r--r-- 1 nobody web 31413 Mar 9 16:03 layout/theme.php As I chown the dir back to the owner of header.php it start working again... # chown -R web layout/ # ll layout/theme.php -rw-r--r-- 1 web web 31413 Mar 9 16:03 layout/theme.php Safe mode is off Reproduce code: --------------- Cannot find a few lines of code reproducing the bug, should see the whole application Expected result: ---------------- I expect to have the page included without problems Actual result: -------------- Warning: include(layout/theme.php) [function.include]: failed to open stream: No such file or directory in /......./html/header.php on line 35 Warning: include() [function.include]: Failed opening 'layout/theme.php' for inclusion (include_path='.:/usr/local/lib/php') in /......./html/header.php on line 35 -- Edit bug report at http://bugs.php.net/?id=36673&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36673&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36673&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36673&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36673&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36673&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36673&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36673&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36673&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36673&r=support Expected behavior: http://bugs.php.net/fix.php?id=36673&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36673&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36673&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36673&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36673&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36673&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36673&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36673&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36673&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36673&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36673&r=mysqlcfg

« previous php.bugs (#94103) next »