SoCkEt7
SoCkEt7

Reputation: 2277

Failed loading opcache.so: opcache.so: cannot open shared object file

Ive got an issues with Opcache on my apache2 logs file

The error is : Failed loading opcache.so: opcache.so: cannot open shared object file

Do you have any ideas ?

I'm running on Debian squeeze php 5.4 with Opcache

Thanks

Upvotes: 0

Views: 13382

Answers (2)

Anatolii Ivanov
Anatolii Ivanov

Reputation: 109

My environment was Windows 10x64 / WSL Ubuntu 20.04LTS / PHP 8.1

I tried to install Laravel

I did symbolic link for php8.1 instead of 8.2 because of Laravel requirements

The problem was in extension_dir path. I just changed it from "./" to /usr/lib/php/20210902

You should find your extension dir path by yourself with

php-config --extension-dir

Upvotes: 0

TerryE
TerryE

Reputation: 10898

OPcache is a Zend extension not a PHP one, and the zend_extension directive takes an absolute path of the opcache.so shareable image and not relative to the _extension_dir_.

As OPcache isn't bundled with PHP5.4, I assume that you've build OPcache with the PECL package, but however you've build it, you must use its absolute path for then Zend extension loader to find it.

Upvotes: 0

Related Questions