Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.

SOLVED Shlink on LAMP, APC absent?

  • Hi, I'm trying to get Shlink going on a LAMP app but it seems to crash over an APCU thing, though APCU should be included in LAMP. Can it possibly be fixed?

    php -i | grep apc yields nothing.

    Initializing database... [Running "/usr/bin/php7.2 vendor/doctrine/orm/bin/doctrine.php orm:schema-tool:create"]   RUN  '/usr/bin/php7.2' 'vendor/doctrine/orm/bin/doctrine.php' 'orm:schema-tool:create'
      ERR  PHP Fatal error:  Uncaught Error: Call to undefined function apcu_fetch() in /app/data/shlink/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php:26
      ERR  Stack trace:
      ERR  #0 /app/data/shlink/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php(200): Doctrine\Common\Cache\ApcuCache->doFetch('DoctrineNamespa...')
      ERR  #1 /app/data/shlink/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php(177): Doctrine\Common\Cache\CacheProvider->getNamespaceVersion()
      ERR  #2 /app/data/shlink/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php(60): Doctrine\Common\Cache\CacheProvider->getNamespacedId('Shlinkio\\Shlink...')
      ERR  #3 /app/data/shlink/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(177): Doctrine\Common\Cache\CacheProvider->fetch('Shlinkio\\Shlink...')
      ERR  #4 /app/data/shlink/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(89): Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory->getMetadataF in /app/data/shlink/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php on line 26
      RES  255 Command did not run successfully
  • Staff

    The lamp app ships currently with yac instead of apcu and they don't seem to be compatible to be installed in parallel it seems. I am not an expert on either of them, do you or anyone know how to resolve this otherwise?

  • I've no idea yet, but I want to look into it. Btw, apcu is listed in the docs still, while yac is not.

  • Staff

    @yusf I think it's a bug that yac got installed as default instead of acpu. This was because of an ordering issue in the package installation. I think ACPu is what we want to support as part of LAMP app (and keeps it consistent with the docs as well).

  • Staff

    I have pushed an update to the LAMP app. With the update, I was able to install and run shlink. To test, make a fresh LAMP installation (updates will take a while to roll out).

  • Excellent, thank you!

  • I got it to work. The external app,, can't reach the API though I can't figure out why. It should just be http requests, right?

    Also, the app now reports back to box as "Not responding" though it's running. 🤔

  • Staff

    I think the not responding is because the root of the app returns a 404 😕 There is no admin panel for shlink afaict (I used the CLI tool to test).

  • Okay, I understand. It's fine by me.

    The separate admin panel's latest release just renders a blank page for me (locally and on LAMP) ¯_(ツ)_/¯