Bug #74268 [NEW]: Opcache fails to detect directory symlink changes

From: Date: Fri, 17 Mar 2017 21:07:45 +0000
Subject: Bug #74268 [NEW]: Opcache fails to detect directory symlink changes
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207915@lists.php.net to get a copy of this message
From: marshall at ahoy dot com Operating system: Linux Ubuntu 16.04.2 LTS PHP version: 7.1.3 Package: opcache Bug Type: Bug Bug description:Opcache fails to detect directory symlink changes Description: ------------ When a directory symlink is changed to a new target directory and the new target contains file names that were also in the old target directory, OPcache sometimes returns the old file instead of the new file. lrwxrwxrwx 1 root root 2 Mar 17 20:28 v -> v1 -rw-r--r-- 1 root root 60 Mar 17 20:22 test.php drwxr-xr-x 2 root root 4096 Mar 17 20:22 v2 drwxr-xr-x 2 root root 4096 Mar 17 20:21 v1 Both v1 and v2 contain home.php with different contents Changing the symlink v from v1 to v2 does not always cause the desired result. Sometimes OPcache alternates between the two different home.php pages. Using FPM/FastCGI with PHP Version 7.1.3-2+deb.sury.org~xenial+1 Same problem using PHP Version 7.0.15 Test script: --------------- test.php: <?php echo "This is test.php\n"; include("v/home.php"); ?> v1/home.php: <?php echo "This is v1/home.php\n"; v2/home.php: <?php echo "This is v2/home.php\n"; -- Edit bug report at https://bugs.php.net/bug.php?id=74268&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74268&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74268&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74268&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74268&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74268&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74268&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74268&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74268&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74268&r=support Expected behavior: https://bugs.php.net/fix.php?id=74268&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74268&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74268&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74268&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74268&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74268&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74268&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74268&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74268&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74268&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74268&r=mysqlcfg

« previous php.bugs (#207915) next »