You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As shown, the support for NTFS streams is totally inconsistent. Reading and writing such streams is supported, but file_exists() and stat() behave differently for NTS and ZTS builds (and even differently for NTS streams depending on whether an absolute or relative path is given). realpath() always fails.
Furthermore, pathinfo() and friends report the stream name as part of the filename, usually even as part of the file extension.
This (dangerous) inconsistency should be resolved one way or another. It might be best to completely remove support for NTFS streams for plain files, mostly to be consistent with other systems, and to avoid confusion for userland developers. A simple solution would be to "reject" such filenames, i.e. report permission denied when trying to access them. If we do this, pathinfo() and friends can likely stay as is.
If support for NTFS streams is desireable, we could introduce a new stream wrapper (say ntfs://) which would make NTFS stream access explicit.
PHP Version
all supported versions
Operating System
Windows
The text was updated successfully, but these errors were encountered:
Description
The following code:
Resulted in this output for NTS builds:
Resulted in this output for ZTS builds:
As shown, the support for NTFS streams is totally inconsistent. Reading and writing such streams is supported, but
file_exists()
andstat()
behave differently for NTS and ZTS builds (and even differently for NTS streams depending on whether an absolute or relative path is given).realpath()
always fails.Furthermore,
pathinfo()
and friends report the stream name as part of the filename, usually even as part of the file extension.This (dangerous) inconsistency should be resolved one way or another. It might be best to completely remove support for NTFS streams for plain files, mostly to be consistent with other systems, and to avoid confusion for userland developers. A simple solution would be to "reject" such filenames, i.e. report permission denied when trying to access them. If we do this,
pathinfo()
and friends can likely stay as is.If support for NTFS streams is desireable, we could introduce a new stream wrapper (say
ntfs://
) which would make NTFS stream access explicit.PHP Version
all supported versions
Operating System
Windows
The text was updated successfully, but these errors were encountered: