$dbHandler is deprecated

When trying to access my site as visitor or to login I receive this error -

Creation of dynamic property PageController::$dbHandler is deprecated|#0 /home3/sixfivka/public_html/glensphotography/backlight/modules/module-framework/controllers/Controller.php(45): ErrorHandler::handleError(8192, ‘Creation of dyn…’, ‘/home3/sixfivka…’, 45) #1 /home3/sixfivka/public_html/glensphotography/backlight/modules/module-designer/application/controllers/PageController.php(14): Controller->loadDAO(Array) #2 /home3/sixfivka/public_html/glensphotography/backlight/modules/module-framework/models/Dispatchable.php(292): PageController->__construct(‘view’) #3 /home3/sixfivka/public_html/glensphotography/backlight/modules/module-framework/models/Dispatchable.php(215): Dispatchable->createControllerIfNeeded() #4 /home3/sixfivka/public_html/glensphotography/backlight/modules/module-framework/models/Dispatchable.php(89): Dispatchable->processParameters() #5 /home3/sixfivka/public_html/glensphotography/backlight/modules/module-framework/Framework.php(50): Dispatchable->init() #6 /home3/sixfivka/public_html/glensphotography/index.php(38): Framework->route() #7 {main}|URL: /index.php

Site has been operational for quite some time - this came “out of the blue” today.

Which version of Backlight are you running, and which version of PHP is currently enabled on your host?

Likely they bumped you to a newer PHP, and you’re on an incompatible version of Backlight.

Backlight 4
Server is running PHP 8.1.27

Hi Glen, as far as I know this should be an issue with compatibility in PHP 8.2 and above, so I’m not sure why you’re seeing it with 8.1. Are you able to configure your site to run on an earlier version of PHP?

Backlight 5 addressed this type of error. The changes were extensive, hence addressing it only in our current version of Backlight.

Thanks Ben. Contacted my host and was able to fix the problem. It was in fact a PHP version problem - they had set my site (it’s an add-on domain) to 8.2 but the change was not showing up in my cpanel. Set it back to ver 8.1 and regained access. Looks like it’s time to think about that Backlight version upgrade I’ve been putting off … :wink:

1 Like

Have now upgraded to version 5, so this problem has been reassigned to the dustbin of history. Thanks Matt and Ben!

3 Likes