php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40092 md5_file don't work in some conditions
Submitted: 2007-01-10 15:30 UTC Modified: 2007-01-22 09:33 UTC
From: n dot escuder at intra-links dot com Assigned: dmitry (profile)
Status: Closed Package: Filesystem function related
PHP Version: 5.2.0 OS: Linux 2.6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: n dot escuder at intra-links dot com
New email:
PHP Version: OS:

 

 [2007-01-10 15:30 UTC] n dot escuder at intra-links dot com
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-10 15:35 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 [2007-01-10 16:07 UTC] n dot escuder at intra-links dot com
I don't understand why you say this because before i have found an bug that seem to be the same and i twas corrected by you http://bugs.php.net/bug.php?id=37395

For me it's an md5/chroot bug.

So i don't understand.

Can i have more explanation please ?
Or a mailing list for asking ?

Please.

Nicolas
 [2007-01-14 21:22 UTC] n dot escuder at intra-links dot com
The bug and the number 37395 are related to the php_stream_open_wrapper C function. I don't known which bug i must stay open so close one of them.

For more informations please mail me.
 [2007-01-17 10:38 UTC] tony2001@php.net
Dmitry, I guess we need to clear realpath_cache on chroot().
 [2007-01-22 09:33 UTC] dmitry@php.net
Fixed in CVS HEAD and PHP_5_2.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Dec 14 08:01:23 2019 UTC