forgot the info about the related file:
/backwpup/src/Infrastructure/Restore/commons.php
at the end is your function with simple session_start() line.
Hello,
Thank you for bringing this to our attention. You are absolutely correct that session_start() should ideally only be used in the standalone app and not within WordPress. For WordPress, it’s recommended to store session-related data using options or usermeta, following WordPress best practices.
We’ve noted your feedback, and I’ve shared it with our development team. We’ve taken this as a feature request, and hopefully, it will be considered for future updates to improve the way sessions are handled.
As of now, there is no workaround or ETA for this change, but we appreciate your patience and understanding in the meantime.
If you encounter any further issues or need help, feel free to reach out.
Best Regards,
hi, thanks for your feedback. As of PHP 8.x – don’t know the exact minor version – this throws a lot of error log entries, if error logging is active:
[25-Oct-2024 12:12:10 Europe/Berlin] PHP Notice: session_start(): Ignoring session_start() because a session is already active in /www/htdocs/…/wp-content/plugins/backwpup/src/Infrastructure/Restore/commons.php on line 358
Imho to wrap your session_start() in a check of a session already existing should be no big deal, that does not need to be discussed, isn’t it? Additionally this session_start() is part of the – really cool!!! – new restore function of the free plugin. I am sure, it is not necessary, to execuute/initialize this functionality in the frontend of the website …. 😉
For now my workaround is just disabling error logging for this special error:
set_error_handler(array($this, “customErrorHandler”));
function customErrorHandler($errno, $errstr, $errfile, $errline) {
if (strpos($errstr, ‘session_start(): Ignoring session_start()’) !== false) {
return true;
}
return false;
}
Not ideal, but it allows me to keep my error logging active with being punished by BackWPUp.
Hi,
I have taken the note and added it to the escalated report for our developers.
Thanks and regards.