No Code Attached Yet bug
avatar joomleb
joomleb
16 Jan 2023

Hi guys,
PHP 7.4.33 + MariaDB 10.5.15 + Joomla 4.2.6 (Upgraded from 3.10.11) + some Extensions (including Seblod)
I was managing users and it seems like that after a session expiration I had suddenly back this Error 500 I'm reporting.
I'm going to try to replicate the Error, so, the question is:
Do you have any idea what could be causing it?
Do you have any ideas on what I have to be careful about?

Warning: session_start(): Failed to initialize storage module: user (path: /tmp) in /home/…/libraries/vendor/joomla/session/src/Storage/NativeStorage.php on line 478

Warning: mysqli::real_escape_string(): invalid object or resource mysqli in /home/…/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php on line 388

Warning: mysqli::real_escape_string(): invalid object or resource mysqli in /home/…/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php on line 388

Warning: mysqli::prepare(): invalid object or resource mysqli in /home/…/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php on line 137

Host 'localhost' is not allowed to connect to this MariaDB server

Joomla\Database\Exception
PrepareStatementFailureException

in /home/…/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php (line 141)
in /home/…/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php -> __construct (line 1048)
in /home/…/libraries/vendor/joomla/database/src/DatabaseDriver.php -> prepareStatement (line 1900)
DatabaseDriver->setQuery(object(MysqliQuery))
in /home/…/administrator/components/com_templates/src/Model/StyleModel.php (line 737)
StyleModel->getAdminTemplate(0)
in /home/…libraries/src/Application/AdministratorApplication.php (line 230)
AdministratorApplication->getTemplate(true)
in /home/…/libraries/src/Error/Renderer/HtmlRenderer.php (line 50)
HtmlRenderer->render(object(ConnectionFailureException))
in /home/…/libraries/src/Exception/ExceptionHandler.php (line 121)
ExceptionHandler::render(object(ConnectionFailureException))
in /home/…/libraries/src/Exception/ExceptionHandler.php (line 72)
ExceptionHandler::handleException(object(ConnectionFailureException))
in /home/…/libraries/src/Application/CMSApplication.php (line 323)
CMSApplication->execute()
in /home/…/develop/administrator/includes/app.php (line 61)
require_once('/home/…/administrator/includes/app.php')
in /home/…/administrator/index.php (line 32)

Joomla\Database\Exception
ConnectionFailureException

Could not connect to database: Host 'localhost' is not allowed to connect to this MariaDB server
in /home/…/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php (line 280)
in /home/…/libraries/vendor/joomla/session/src/Handler/DatabaseHandler.php -> connect (line 233)
DatabaseHandler->open('/tmp', '051771ea6d83c9739ce0c61412d04d6a')
in /home/…/libraries/vendor/joomla/session/src/Storage/NativeStorage.php session_start (line 478)
NativeStorage->start()
in /home/…/libraries/src/Session/Storage/JoomlaStorage.php (line 295)
in /home/…/libraries/vendor/joomla/session/src/Session.php -> start (line 406)
in /home/…/libraries/vendor/joomla/session/src/Session.php -> start (line 333)
Session->has('registry')
in /home/…/libraries/src/Session/Session.php (line 191)
Session->get('registry')
in /home/…/libraries/src/Application/CMSApplication.php (line 656)
CMSApplication->getUserState('application.lang')
in /home/…/libraries/src/Application/AdministratorApplication.php (line 162)
AdministratorApplication->doExecute()
in /home/…/develop/libraries/src/Application/CMSApplication.php (line 294)
CMSApplication->execute()
in /home/…/administrator/includes/app.php (line 61)
require_once('/home/…/administrator/includes/app.php')
in /home/…/administrator/index.php (line 32)

avatar joomleb joomleb - open - 16 Jan 2023
avatar joomla-cms-bot joomla-cms-bot - change - 16 Jan 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 16 Jan 2023
avatar carlitorweb
carlitorweb - comment - 18 Jan 2023

This is not a Joomla issue. Look like a write files permission in your directory. @richard67


But, try the follow: Go to the main Joomla folder and open the configuration.php file to check the value of the variable $session_handler. If the value is 'filesystem', write enable the file and change the value to 'database' and save the file. Access the website and check if the error has now disappeared.

avatar joomleb
joomleb - comment - 19 Jan 2023

@carlitorweb
thank you for your answer.
The setting is yet: "System > Global Configuration > System > Session > Session Handler: Database".

Anyway, following your suggestion and don't knowing if there is an alternative official way (Do you know if there is?), I used PWT ACL to fix the Assets table issues.
And I'm testing...

avatar Hackwar Hackwar - change - 23 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 23 Feb 2023

Add a Comment

Login with GitHub to post a comment