[php-src] Issue #20585: Opcache failed loading
| From: | carliblaz | Date: | Tue, 25 Nov 2025 12:45:09 +0000 |
| Subject: | [php-src] Issue #20585: Opcache failed loading | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-251303@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/20585
Author: carliblaz
### Description
The following code:
```ini
; Configures opcache
opcache.memory_consumption=32
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.enable=1
zend_extension=opcache.so
```
Resulted in this output:
```
NOTICE: PHP message: PHP Warning: Failed loading Zend extension 'opcache.so' (tried:
/opt/php/php8/lib/php/extensions/no-debug-non-zts-20250925/opcache.so (Error loading shared library
/opt/php/php8/lib/php/extensions/no-debug-non-zts-20250925/opcache.so: No such file or directory),
/opt/php/php8/lib/php/extensions/no-debug-non-zts-20250925/opcache.so.so (Error loading shared
library /opt/php/php8/lib/php/extensions/no-debug-non-zts-20250925/opcache.so.so: No such file or
directory)) in Unknown on line 0
```
If there is existing zend_extension=opcache.so value in php.ini, opcache extension fail to load. If
it's commented it works. There are existing build that have this php.ini value.
### PHP Version
```plain
PHP 8.5.0 (cli) (built: Nov 25 2025 12:24:00) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.5.0, Copyright (c) Zend Technologies
with Zend OPcache v8.5.0, Copyright (c), by Zend Technologies
```
### Operating System
Alpine