php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73962 bug with symlink related to cyrillic directory
Submitted: 2017-01-20 11:52 UTC Modified: -
From: dolgov at bk dot ru Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 7.1.1 OS: Windows 7
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dolgov at bk dot ru
New email:
PHP Version: OS:

 

 [2017-01-20 11:52 UTC] dolgov at bk dot ru
Description:
------------
Can't check file by symlink, but do it by realpath

run.bat
SET "URL=http://windows.php.net/downloads/releases/php-7.1.1-Win32-VC14-x64.zip"
SET "FILENAME=%~dp0\php7.1.1.zip"
bitsadmin.exe /transfer "php7.1.1" "%URL%" "%FILENAME%"

SET "URL=http://windows.php.net/downloads/releases/php-7.0.15-Win32-VC14-x64.zip"
SET "FILENAME=%~dp0\php7.0.15.zip"
bitsadmin.exe /transfer "php7.0.15" "%URL%" "%FILENAME%"

for /F "delims=" %%I IN (' dir /b /s /a-d *.zip ') DO (
    "C:\Program Files\7-Zip\7z.exe" x -y -o"%%~dpI\%%~nI" "%%I"
)
MKDIR "%~dp0Новая папка"
MKDIR "%~dp0Новая папка\Новая папка"
MKDIR "%~dp0Новая папка\Новая папка\sql"

echo File is readable! >"%~dp0Новая папка\Новая папка\sql\test.txt"
MKLINK /D d "%~dp0Новая папка\Новая папка\sql"

@echo off
php7.0.15\php.exe -c="php7.0.15\php.ini-development" run.php
php7.1.1\php.exe  -c="php7.1.1\php.ini-development"  run.php

Test script:
---------------
// run.php
<?php
$dir = 'Новая папка\Новая папка\sql';
function isReadable($path) {
    return (is_readable($path) ? ' +': ' -');
}
function check ($path) {
    $path .= '\test.txt';
    return isReadable($path) . isReadable(__DIR__.DIRECTORY_SEPARATOR.$path);
}
print 'PHP '.PHP_VERSION."\t" . check($dir) . check('d') . PHP_EOL;

Expected result:
----------------
PHP 7.0.15	 + + + +
PHP 7.1.1	 + + + +

Actual result:
--------------
PHP 7.0.15       + + + +
PHP 7.1.1        + + - -

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-20 22:48 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=95406c878a9cc25ad1e831e619afba683e92f05a
Log: Fixed bug #73962 bug with symlink related to cyrillic directory
 [2017-01-20 22:48 UTC] ab@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC