-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Inconsistent resource loading when opcache enabled #16442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi! I can confirm that php 8.4.0rc2 have trouble with opcache enabledIn my use case:
... FcgidErrorScanInterval:60 secondes
Disabling opcache on 8.4.0rc2: ✅ no random 500 ⏩ available to detail or perform other tests as needed |
@nono303 I think that's a different issue, as this one also occurs on rc1 |
do I move it to a new issue? |
Yeah I'd say so |
⏩ #16449 |
@jnvsor This is because the initial request will open the file to compile it. It is cached on subsequent request, so that step is skipped. I also wasn't aware that the opened file will be available through <?php
$rs = get_resources();
$r = reset($rs);
print '<pre>';
var_dump($r);
var_dump(rewind($r));
var_dump(htmlspecialchars(stream_get_contents($r)));
|
From https://www.php.net/get_resources:
|
Yeah that reads like a wontfix then. I'll go ahead and close this |
Description
When opcache is enabled successive page loads will not have the script loaded as a resource - I was told this is probably a bug.
This script:
Results in this output on the first load:
And this on the second:
The resource will be back in the list on the first request after the file is changed.
Docker build for easy repro:
PHP Version
8.4-rc2
Operating System
No response
The text was updated successfully, but these errors were encountered: