PHP Warning: Could not write session to the database

Hello,

i have one Trouble with apache2 and PHP.

The error Log shows messages like this.

AH01071: Got error ‘PHP message: PHP Warning: Could not write session to the database. Please check MySQL configuration. in /home/dasnetzundich/public_html/wp-content/plugins/wp-native-php-sessions/inc/class-session-handler.php on line 45PHP message: PHP Warning: session_write_close(): Failed to write session data using user defined save handler. (session.save_path: /home/dasnetzundich/tmp) in /home/dasnetzundich/public_html/wp-includes/class-wp-hook.php on line 290’

How can i fix this?

It’s most likely a configuration problem in your Wordpress plugin. First off, why are you using WordPress Native PHP Sessions? Wordpress itself doesn’t use it, so it must be either a plugin you’re using that needs it or some sort of special theme you’re using that needs it.

More than likely the settings in the Native PHP Sessions plugin are wrong, or the theme/plugin you’re using it for has a wrong setting.

It would have nothing to do with Virtualmin.

1 Like

I tried to figure out what is the Problem. I have an Cookie Banner that is showing on every Page.
Also i have this message in Wordpress.

A PHP session was created by a session_start () function call. This affects the REST API and loopback requests. The session should be closed by session_write_close () before any HTTP requests are made.

i dont know how can i fix this

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.