4

I changed my default apache server setup on my mac to be able of easily switching between php versions following this guide.

Now, when I return to my project which is based on the CMS TYPO3, I get the error, that "The PHP extension "apcu" must be installed and loaded in order to use the APCu backend.".

So I was following the tutorial (by the same author) to install and enable apcu. I can sum up the installation process:

$ sphp 5.6
$ brew install autoconf
$ pecl channel-update pecl.php.net
$ pecl install apcu-4.0.11

This actually worked perfectly for php 5.6! But I wanted php 7.2 for my project. The tutorial instructs to do this:

$ sphp 7.2
$ pecl uninstall -r apcu
$ pecl install apcu

No errors here. But the CMS still claims no apcu! Searching for "apc" in phpinfo also returns in no results! Pecl added the extension="apcu.so" line in the loaded php 7.2 ini, so I don't understand what's wrong. Of course I restarted apache every time. Also no errors or warnings here.

Also after googling I have no idea what to do :/

primarykey123
  • 137
  • 1
  • 9

2 Answers2

0

You may try using an absolute path of the apcu.so in php.ini, Like

extension="/usr/local/Cellar/php/7.3.2/pecl/20180731/apcu.so"

The path depends. Don't know why but this works for me anyway.

partyspy
  • 31
  • 4
0

You may also need to check the following ini config entry for apcu:

apc.enabled=on
apc.enable_cli=on
unifreak
  • 773
  • 6
  • 17