0

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

SoCkEt7
  • 2,237
  • 5
  • 22
  • 30

2 Answers2

0

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.

TerryE
  • 10,724
  • 5
  • 26
  • 48
  • 1
    Thanks but my path is the real one : zend_extension=/usr/lib/php5/20100525/opcache.so – SoCkEt7 Apr 10 '14 at 12:36
  • In which case your error is wrong. 5.4 reports the zend_extension argument literally so if it is as you say just "`opcache.so`" then that's the arg being set in the INI. Check that you are loading the INI fileset that you thing you are being pathed in is -- e.g. change the arg to .../xopcache.so and see if the error also changes. If not you are pulling in a different INI file. – TerryE Apr 10 '14 at 22:28
0

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