From:             n dot escuder at intra-links dot com
Operating system: Linux 2.6
PHP version:      5.2.0
PHP Bug Type:     Filesystem function related
Bug description:  md5_file don't always work when chroot

Description:
------------
When executing md5_file on a chroot fs it say no such file and it's false.

Reproduce code:
---------------
<?
mkdir( "/tmp/php/include", 0777, true );
touch( "/tmp/php/include/one.php" );
symlink( "/tmp/php/include", "/tmp/php/link" );
ini_set( "include_path", "/tmp/php/link" );
require_once "one.php";
mkdir( "/tmp/chroot" );
chroot( "/tmp/chroot" );
mkdir( "/tmp/php/link", 0777, true );
touch( "/tmp/php/link/one.php" );
md5_file( "/tmp/php/link/one.php" );
?>

Expected result:
----------------
the md5 of the file.

Actual result:
--------------
Warning: md5_file(/tmp/php/link/one.php): failed to open stream: No such
file or directory

-- 
Edit bug report at http://bugs.php.net/?id=40092&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40092&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40092&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40092&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40092&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40092&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40092&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40092&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40092&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40092&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40092&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40092&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40092&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40092&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40092&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40092&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40092&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40092&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40092&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40092&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40092&r=mysqlcfg

Reply via email to