Edit report at https://bugs.php.net/bug.php?id=70357&edit=1
ID: 70357
Updated by: cmb@php.net
Reported by: viktor at szepe dot net
Summary: OPcache status is unavailable in shutdown
-Status: Open
+Status: Feedback
Type: Bug
Package: opcache
Operating System: Debian 8.1
PHP Version: 7.0.0RC1
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
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>
Previous Comments:
------------------------------------------------------------------------
[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??
------------------------------------------------------------------------
[2015-08-26 06:59:24] viktor at szepe dot net
Docs says:
If opcache.restrict_api is in use and the current path is in violation of the rule, an E_WARNING
will be raised; no status information will be returned.
Does '/home/wp/website/html/opcache-status-in-shutdown.php' violate
"/home/wp/website/" ?
------------------------------------------------------------------------
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