php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: janos at pasztor dot at
New email:
PHP Version: OS:

 

 [2016-06-30 09:02 UTC] janos at pasztor dot at
Description:
------------
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/example1.com/var/www/htdocs/index.php
Chroot 1: /var/www/example1.com

Full path 2: /var/www/example2.com/var/www/htdocs/index.php
Chroot 2: /var/www/example2.com


Expected result:
----------------
Update the documentation at https://secure.php.net/manual/en/install.fpm.configuration.php 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.)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-06-30 09:08 UTC] requinix@php.net
-Status: Open +Status: Duplicate
 [2016-06-30 09:08 UTC] requinix@php.net
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: Thu Mar 28 22:01:26 2024 UTC