Req #80812 [Opn->Fbk]: opcache.cache_id should be PHP_INI_PERDIR

From: Date: Mon, 01 Mar 2021 11:54:40 +0000
Subject: Req #80812 [Opn->Fbk]: opcache.cache_id should be PHP_INI_PERDIR
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-232445@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80812&edit=1

 ID:                 80812
 Updated by:         cmb@php.net
 Reported by:        aschmidt at anamera dot net
 Summary:            opcache.cache_id should be PHP_INI_PERDIR
-Status:             Open
+Status:             Feedback
 Type:               Feature/Change Request
 Package:            opcache
 Operating System:   Windows
 PHP Version:        7.4.15
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

> "Fatal Error Cannot create mutex"

Great error message.  It should at least contain the error code,
to be able to diagnose the problem.

Anyhow, if both sites run under the same user account (and both
use impersonation or not), that shouldn't cause CreateMutex() to
fail.  But still it is likely a good idea not to share the OPcache
instance in your case.  I'm not sure that changing
opcache.cache_id to PHP_INI_PERDIR is sensible, but it shouldn't
be necessary for IIS anyway, because you can run the two sites
with different application pools, and you can use pool specific
environment variables to run with different cache_ids.


Previous Comments:
------------------------------------------------------------------------
[2021-02-28 14:26:50] aschmidt at anamera dot net

Description:
------------
I have a Windows Service (PHP 7.4 CLI), plus two IIS web sites, configured to run under the same
Windows User ID with network privileges, because they need to access a certain network share.

One web site was using PHP 7.3, and one web site PHP 7.4 (because it's a development/staging
site). 

In the 7.4 php.ini "cache_id" is set.

When I attempt to run the first web site also under 7.4, then scripts will start failing, due to
"Fatal Error Cannot create mutex". I'm assuming, since both IIS sites (with different
application code versions) now share the same PHP version and UserID, this results in a clash?

If so, would the solution be to allow different/unique "cache_id"s to be configured in the
.user.ini of each IIS site, rather than only being able to configure a common one in the system-wide
php.ini?




------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=80812&edit=1


Thread (11 messages)

« previous php.bugs (#232445) next »