Bug #70357 [Com]: OPcache status is unavailable in shutdown
| From: | viktor at szepe dot net | Date: | Tue, 13 Jul 2021 17:05:12 +0000 |
| Subject: | Bug #70357 [Com]: OPcache status is unavailable in shutdown | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-235011@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70357&edit=1
ID: 70357
Comment by: viktor at szepe dot net
Reported by: viktor at szepe dot net
Summary: OPcache status is unavailable in shutdown
Status: Feedback
Type: Bug
Package: opcache
Operating System: Debian 8.1
PHP Version: 7.0.0RC1
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Thank you!
PHP 7.4 FPM works the same way. In shutdown function opcache.restrict_api makes opcache_get_status
return false.
I should live with it.
I leave all this up to you!
Previous Comments:
------------------------------------------------------------------------
[2021-07-13 14:59:09] cmb@php.net
I cannot reproduce this with PHP-7.4 (apache2handler on Windows).
So either the issue has been resolved in the meantime, or there is
some relevant difference in our setups. Do you still experience
this issue with any of the actively supported PHP versions[1]?
Which SAPI are you using?
[1] <https://www.php.net/supported-versions.php>
------------------------------------------------------------------------
[2015-09-04 18:35:13] viktor at szepe dot net
I think opcache.restrict_api is not interested in cwd but the path of the queried PHP script.
Before 7.0 I was able to get OPcache status in shutdown.
------------------------------------------------------------------------
[2015-09-04 16:28:12] kalle@php.net
From register_shutdown_function():
Note:
Working directory of the script can change inside the shutdown function under some web servers,
e.g. Apache.
Not sure what we can do about that as this sort of behavior have always been like it around other
places of PHP
------------------------------------------------------------------------
[2015-08-26 07:05:34] viktor at szepe dot net
Yes. getcwd() returns "/" in shutdown.
Even setting opcache.restrict_api to "/" does not help.
Please advise.
------------------------------------------------------------------------
[2015-08-26 07:02:19] viktor at szepe dot net
Maybe the current path changes in shutdown??
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=70357
--
Edit this bug report at https://bugs.php.net/bug.php?id=70357&edit=1