#37395 [NEW]: fopen don't work in some conditions

From: Date: Wed, 10 May 2006 11:41:23 +0000
Subject: #37395 [NEW]: fopen don't work in some conditions
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-96908@lists.php.net to get a copy of this message
From: n dot escuder at intra-links dot com Operating system: Linux PHP version: 5.1.4 PHP Bug Type: Filesystem function related Bug description: fopen don't work in some conditions Description: ------------ fopen report no such file or directory when open in w mode. It's seem to be related with include path with symlink as you can see in sample if the include path is /tmp/php all work. but if the include path is /tmp/link ( sym link ) the script fail. Reproduce code: --------------- ini_set('include_path', "/tmp/link"); @mkdir("/tmp/php", 0777, true); touch("/tmp/php/one.php"); @symlink( "/tmp/php", "/tmp/link" ); require_once "one.php"; @mkdir("/tmp/essai"); chroot("/tmp/essai" ); @mkdir("/tmp/link/interfaces", 0777, true); $fd = fopen("/tmp/link/one.php", "wb"); Expected result: ---------------- No error and an file pointer in $fd Actual result: -------------- Warning: fopen(/tmp/link/one.php): failed to open stream: No such file or directory in /tmp/essai.php on line 16 -- Edit bug report at http://bugs.php.net/?id=37395&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37395&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37395&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37395&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37395&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37395&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37395&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37395&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37395&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37395&r=support Expected behavior: http://bugs.php.net/fix.php?id=37395&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37395&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37395&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37395&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37395&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37395&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37395&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37395&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37395&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37395&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37395&r=mysqlcfg

« previous php.bugs (#96908) next »