Bug #67220 [Com]: realpath() on MacOSX doesn't normalize the case of characters

From: Date: Thu, 25 May 2023 06:38:22 +0000
Subject: Bug #67220 [Com]: realpath() on MacOSX doesn't normalize the case of characters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-244522@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67220&edit=1

 ID:                 67220
 Comment by:         worldsaynews at gmail dot com
 Reported by:        nicolas dot grekas+php at gmail dot com
 Summary:            realpath() on MacOSX doesn't normalize the case of
                     characters
 Status:             Re-Opened
 Type:               Bug
 Package:            Filesystem function related
 Operating System:   MacOSX/Darwin
 PHP Version:        5.5.12
 Block user comment: N
 Private report:     N

 New Comment:

World Say News are sharing latest news about travel, tech, business, auto, home improvement,
finance, entertainment etc. More info to visit: (https://worldsaynews.com)github.com


Previous Comments:
------------------------------------------------------------------------
[2015-08-10 20:24:00] tyrael@php.net

on case-sensitive HFS there is no issue, as there is nothing to "normalize".
HFS+ by default is case-insensitive case-preserving, the same as NTFS on windows by default.
given how we support returning the preserved version of the filename on Windows/NTFS and the fact
that the realpath libc function on mac seems to properly return the preserved version(used https://gist.github.com/Tyrael/68dc7d6e0b96c2c231e4
to test it) I think it would be expected to work that way from php also.

------------------------------------------------------------------------
[2015-08-05 15:26:33] andreas at heigl dot org

Has this issue been tested with both case-sensitive AND case-insensitive HFS+ and are the results
the same?

Or is it only an issue with case-insensitive HFS+?

------------------------------------------------------------------------
[2015-08-05 15:09:39] cmb@php.net

Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=337295
Log: added note regarding normalization of the character case on case-insensitive
filesystems (see #67220)

------------------------------------------------------------------------
[2015-08-04 15:06:35] bishop@php.net

I agree with tyrael: "I think closing the issue with Not a bug is wrong, we should either keep
it open until we can fix it, or mark as Won't fix, and document it."

Side note, jpauli talks about the intra-path caching rasmus mentioned in this article: http://jpauli.github.io/2014/06/30/realpath-cache.html

------------------------------------------------------------------------
[2014-08-01 10:41:22] rullaf at gmail dot com

Please note this is sill an issue. Either the documentation should be changed to warn the realpath
function does NOT return canonical path (it currently says realpath — Returns
canonicalized absolute pathname) or the function should be fixed.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=67220


--
Edit this bug report at https://bugs.php.net/bug.php?id=67220&edit=1


Thread (11 messages)

« previous php.bugs (#244522) next »