Can't get cachet to work on the new Laravel Forge servers that come with php7.
Here's the error I'm getting
Seems to be simply because APC module is missing and.. am I understanding that it's been discontinued? Is there a workaround?
production.CRITICAL: Symfony\Component\Debug\Exception\FatalThrowableError: Fatal error: Call to undefined function Illuminate\Cache\apc_fetch() in /home/forge/cachet.mydomain.com/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php:32
Stack trace:
#0 /home/forge/cachet.mydomain.com/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php(46): Illuminate\Cache\ApcWrapper->get('laravel615e68f0...')
#1 /home/forge/cachet.mydomain.com/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(129): Illuminate\Cache\ApcStore->get('615e68f067a0f13...')
#2 /home/forge/cachet.mydomain.com/vendor/laravel/framework/src/Illuminate/Session/CacheBasedSessionHandler.php(58): Illuminate\Cache\Repository->get('615e68f067a0f13...', '')
#3 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(12025): Illuminate\Session\CacheBasedSessionHandler->read('615e68f067a0f13...')
#4 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(12017): Illuminate\Session\Store->readFromHandler()
#5 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(12009): Illuminate\Session\Store->loadSession()
#6 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(11919): Illuminate\Session\Store->start()
#7 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(11898): Illuminate\Session\Middleware\StartSession->startSession(Object(Illuminate\Http\Request))
#8 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#9 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(9906): call_user_func_array(Array, Array)
#10 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#11 /home/forge/cachet.mydomain.com/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#12 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(13094): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#13 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#14 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(9906): call_user_func_array(Array, Array)
#15 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#16 /home/forge/cachet.mydomain.com/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#17 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(13031): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#18 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#19 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(9906): call_user_func_array(Array, Array)
#20 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#21 /home/forge/cachet.mydomain.com/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#22 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#23 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(9891): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#24 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(8172): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#25 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(8163): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#26 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(8153): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#27 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(2409): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#28 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#29 /home/forge/cachet.mydomain.com/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#30 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(3264): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#31 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#32 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(9906): call_user_func_array(Array, Array)
#33 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#34 /home/forge/cachet.mydomain.com/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#35 /home/forge/cachet.mydomain.com/vendor/fideloper/proxy/src/TrustProxies.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#36 [internal function]: Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#37 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(9906): call_user_func_array(Array, Array)
#38 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#39 /home/forge/cachet.mydomain.com/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#40 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#41 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(9891): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#42 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(2356): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#43 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(2340): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#44 /home/forge/cachet.mydomain.com/public/index.php(54): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#45 {main} {"identification":{"id":"55ac5f02-c253-44a8-8b72-1665d5e1f8d4"}}
[2016-05-28 01:59:20] production.CRITICAL: Symfony\Component\Debug\Exception\FatalThrowableError: Fatal error: Call to undefined function Illuminate\Cache\apc_store() in /home/forge/cachet.mydomain.com/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php:45
Stack trace:
#0 /home/forge/cachet.mydomain.com/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php(63): Illuminate\Cache\ApcWrapper->put('laravel615e68f0...', 'a:1:{s:5:"flash...', 7200)
#1 /home/forge/cachet.mydomain.com/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(206): Illuminate\Cache\ApcStore->put('615e68f067a0f13...', 'a:1:{s:5:"flash...', 120)
#2 /home/forge/cachet.mydomain.com/vendor/laravel/framework/src/Illuminate/Session/CacheBasedSessionHandler.php(66): Illuminate\Cache\Repository->put('615e68f067a0f13...', 'a:1:{s:5:"flash...', 120)
#3 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(12091): Illuminate\Session\CacheBasedSessionHandler->write('615e68f067a0f13...', 'a:1:{s:5:"flash...')
#4 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(11912): Illuminate\Session\Store->save()
#5 /home/forge/cachet.mydomain.com/bootstrap/cache/compiled.php(2365): Illuminate\Session\Middleware\StartSession->terminate(Object(Illuminate\Http\Request), Object(Illuminate\Http\Response))
#6 /home/forge/cachet.mydomain.com/public/index.php(57): Illuminate\Foundation\Http\Kernel->terminate(Object(Illuminate\Http\Request), Object(Illuminate\Http\Response))
#7 {main} {"identification":{"id":"f93630cb-5071-4837-97e2-2887251083c6"}}
After running
apt-get install php-apcu php-apcu-bc
I am no longer getting this error when running app:install or app:reset
[Symfony\Component\Debug\Exception\FatalThrowableError]
Fatal error: Call to undefined function Illuminate\Cache\apc_clear_cache()
But seems I am still getting the apc_fetch() errors
Cachet supports PHP 7 out of the box. Both our demo and our very own StyleCI instances run on PHP 7.
Did you restart PHP-FPM after installing APC again?
If you struggle to get APC working, you could use a different cache driver.
php-apcu-bc
No need to install that, just install php-apcu. Our demo is currently running on a server using apc.
This is essentially how our demo was setup:
add-apt-repository ppa:ondrej/php
apt-get update
apt-get install php7.0 php-apcu php-curl php-fpm php-gd php-gmp php-json php-mbstring php-pgsql php-readline php-xml php-zip
Installing all those extensions will give you the best performance on cachet.
Thank you, I might have forgotten to restart php after installing apcu. But all works nice now :)
Most helpful comment
This is essentially how our demo was setup: