Ugrade - host went to php 7.2 - I upgraded Concrete5 to 8.5.2 - web throwing error - how to fix?

Permalink 1 user found helpful
After host upgraded to php 7.2 my website broke - I upgraded Concrete5 to 8.5.2 - now getting the error below - when trying to access website. I can get to the administrator console, but cannot get my website to display. I am not a programmer - am a tech (engineering retired). What exactly needs editing? I tried finding the lines in the code stated below - but then did not know exactly how to edit to stop the problem? HELP Can someone tell me what needs to be added ? ($, "", etc to what) Thanks Helene


Whoops \ Exception \ ErrorException (E_WARNING)
Use of undefined constant CACHE_LIFETIME - assumed 'CACHE_LIFETIME' (this will throw an Error in a future version of PHP)

Whoops\Exception\ErrorException thrown with message "Use of undefined constant CACHE_LIFETIME - assumed 'CACHE_LIFETIME' (this will throw an Error in a future version of PHP)" Stacktrace: #45 Whoops\Exception\ErrorException in /home/helros4/blackledgemusicinc.com/testsite1/concrete/vendor/illuminate/container/Container.php:779 #44 ReflectionClass:newInstanceArgs in /home/helros4/blackledgemusicinc.com/testsite1/concrete/vendor/illuminate/container/Container.php:779 #43 Illuminate\Container\Container:build in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Application/Application.php:420 #42 Concrete\Core\Application\Application:build in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Entity/Block/BlockType/BlockType.php:689 #41 Concrete\Core\Entity\Block\BlockType\BlockType:loadController in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Block/BlockType/BlockType.php:54 #40 Concrete\Core\Block\BlockType\BlockType:getByID in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Block/Block.php:177 #39 Concrete\Core\Block\Block:getByID in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Page/Collection/Collection.php:896 #38 Concrete\Core\Page\Collection\Collection:getBlocks in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Area/Area.php:790 #37 Concrete\Core\Area\Area:getAreaBlocks in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Area/Area.php:772 #36 Concrete\Core\Area\Area:load in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Area/Area.php:519 #35 Concrete\Core\Area\Area:getAreaBlocksArray in /home/helros4/blackledgemusicinc.com/testsite1/concrete/blocks/core_area_layout/controller.php:70 #34 Concrete\Block\CoreAreaLayout\Controller:setupCacheSettings in /home/helros4/blackledgemusicinc.com/testsite1/concrete/blocks/core_area_layout/controller.php:30 #33 Concrete\Block\CoreAreaLayout\Controller:cacheBlockOutput in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Block/CacheSettings.php:47 #32 Concrete\Core\Block\CacheSettings:get in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Block/Block.php:941 #31 Concrete\Core\Block\Block:getBlockCacheSettingsObject in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Block/Block.php:1058 #30 Concrete\Core\Block\Block:cacheBlockOutput in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Block/View/BlockView.php:380 #29 Concrete\Core\Block\View\BlockView:useBlockCache in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Block/View/BlockView.php:419 #28 Concrete\Core\Block\View\BlockView:runControllerTask in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Block/View/BlockView.php:119 #27 Concrete\Core\Block\View\BlockView:setupRender in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/View/AbstractView.php:161 #26 Concrete\Core\View\AbstractView:render in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Area/Area.php:856 #25 Concrete\Core\Area\Area:display in /home/helros4/blackledgemusicinc.com/testsite1/concrete/themes/elemental/default.php:11 #24 include in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/View/View.php:109 #23 Concrete\Core\View\View:inc in /home/helros4/blackledgemusicinc.com/testsite1/concrete/themes/elemental/full.php:4 #22 include in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/View/View.php:288 #21 Concrete\Core\View\View:renderTemplate in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/View/View.php:250 #20 Concrete\Core\View\View:renderViewContents in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/View/AbstractView.php:164 #19 Concrete\Core\View\AbstractView:render in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Http/ResponseFactory.php:148 #18 Concrete\Core\Http\ResponseFactory:view in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Http/ResponseFactory.php:215 #17 Concrete\Core\Http\ResponseFactory:controller in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Http/ResponseFactory.php:362 #16 Concrete\Core\Http\ResponseFactory:collection in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Http/DefaultDispatcher.php:130 #15 Concrete\Core\Http\DefaultDispatcher:handleDispatch in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Http/DefaultDispatcher.php:58 #14 Concrete\Core\Http\DefaultDispatcher:dispatch in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Http/Middleware/DispatcherDelegate.php:39 #13 Concrete\Core\Http\Middleware\DispatcherDelegate:next in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Http/Middleware/ThumbnailMiddleware.php:76 #12 Concrete\Core\Http\Middleware\ThumbnailMiddleware:process in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Http/Middleware/MiddlewareDelegate.php:50 #11 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Http/Middleware/FrameOptionsMiddleware.php:39 #10 Concrete\Core\Http\Middleware\FrameOptionsMiddleware:process in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Http/Middleware/MiddlewareDelegate.php:50 #9 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Http/Middleware/CookieMiddleware.php:35 #8 Concrete\Core\Http\Middleware\CookieMiddleware:process in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Http/Middleware/MiddlewareDelegate.php:50 #7 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Http/Middleware/ApplicationMiddleware.php:29 #6 Concrete\Core\Http\Middleware\ApplicationMiddleware:process in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Http/Middleware/MiddlewareDelegate.php:50 #5 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Http/Middleware/MiddlewareStack.php:86 #4 Concrete\Core\Http\Middleware\MiddlewareStack:process in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Http/DefaultServer.php:85 #3 Concrete\Core\Http\DefaultServer:handleRequest in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Foundation/Runtime/Run/DefaultRunner.php:128 #2 Concrete\Core\Foundation\Runtime\Run\DefaultRunner:run in /home/helros4/blackledgemusicinc.com/testsite1/concrete/src/Foundation/Runtime/DefaultRuntime.php:102 #1 Concrete\Core\Foundation\Runtime\DefaultRuntime:run in /home/helros4/blackledgemusicinc.com/testsite1/concrete/dispatcher.php:45 #0 require in /home/helros4/blackledgemusicinc.com/testsite1/index.php:3 COPY
Stack frames (46)

View Replies:
hutman replied on at Permalink Reply
hutman
Search the application/blocks and the packages directories for CACHE_LIFETIME and you will probably find something like this

protected $btCacheBlockOutputLifetime = CACHE_LIFETIME;


in a block controller, just remove that line and it should fix the problem.
Petersewell replied on at Permalink Reply
This worked for me.

I found the block controller which caused my problem and it was in TWEET-FEED-PACKAGE.

I used ubuntu's GREP command to search a download of all of my website looking for the exact wording you listed above and I found the file and deleted the line and all is working.

Thank you