|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #72521 Document PHP-FPM chroot() issues with the opcode cache
Submitted: 2016-06-30 09:02 UTC Modified: 2016-06-30 09:08 UTC
From: janos at pasztor dot at Assigned:
Status: Duplicate Package: Documentation problem
PHP Version: Irrelevant OS: Linux/Unix
Private report: No CVE-ID: None
 [2016-06-30 09:02 UTC] janos at pasztor dot at
When using the chroot functionality with PHP-FPM and having the same path within the chroots of two different pools, the opcode cached code can get mixed up.

For example these two scripts get mixed up with opcode cache name:

Full path 1: /var/www/
Chroot 1: /var/www/

Full path 2: /var/www/
Chroot 2: /var/www/

Expected result:
Update the documentation at with a warning, something like this:

chroot string
Chroot to this directory at the start. This value must be defined as an absolute path. When this value is not set, chroot is not used.
>>> Be careful when using chroot with opcache! Since the opcache is shared between pools, the paths within the chroots must be unique per chroot, otherwise the opcache will lead to unexpected behavior. <<<

(Alternatively the FPM pool name could be added to the opcache key to avoid this behavior.)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-06-30 09:08 UTC]
-Status: Open +Status: Duplicate
 [2016-06-30 09:08 UTC]
The issue should be addressed, rather than simply having it documented. As noted elsewhere a simple "cache prefix" or similar would (probably?) be sufficient.

Previously reported as bug #68965 and bug #67141.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 07:01:27 2024 UTC