Bug #81677 [NEW]: realpath result is cached

From: Date: Tue, 30 Nov 2021 17:31:18 +0000
Subject: Bug #81677 [NEW]: realpath result is cached
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-238063@lists.php.net to get a copy of this message
From:             jozef dot briss at gmail dot com
Operating system: Linux
PHP version:      7.4.26
Package:          Filesystem function related
Bug Type:         Bug
Bug description:realpath result is cached

Description:
------------
Realpath function is using realpath_cache. This is not documented
anywhere.


Test script:
---------------
<?php

exec("ln -nsf test1 test");
echo realpath("test") . "\n";
exec("ln -nsf test2 test");
echo realpath("test") . "\n";

Expected result:
----------------
/home/****/realpath/test1
/home/****/realpath/test2

Actual result:
--------------
/home/****/realpath/test1
/home/****/realpath/test1

-- 
Edit bug report at https://bugs.php.net/bug.php?id=81677&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=81677&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=81677&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=81677&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=81677&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=81677&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=81677&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=81677&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=81677&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=81677&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=81677&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81677&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=81677&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=81677&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=81677&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=81677&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=81677&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=81677&r=mysqlcfg


Thread (1 message)

  • jozef dot briss at gmail dot com
« previous php.bugs (#238063) next »