I am facing the issue when upgrading moodle site php version from 7.0 to 7.2.
With 7.0 site working fine.
After upgrading error is only on landing page, On which I made custom changes. But admin part and all other pages are working fine with php 7.2
Moodle Version: 3.5
Error code: An error occurred whilst communicating with the server
- line 79 of /lib/classes/session/manager.php: core\session\exception thrown
- line 791 of /lib/setup.php: call to core\session\manager::start()
- line 855 of /config.php: call to require_once()
- line 31 of /index.php: call to require_once()
Thanks for your reply Jean-Roch
I don't think the issue in the custom code.
I removed everything except.
And still error.
This typically happens when you have some content output before the session starts.
This can be because you have something like an
echo call... or it can happen because you have some whitespace before the opening PHP tag.
My bet is that there is an empty newline, or an empty space, or some other hidden character on or before the
Thanks for your reply. I am not using anything different from the default file system.
the error is only when I change the version to 7.2 form 7.0 via the panel.
Fairly certain the PHP 7.2 fixes/changes in session handling, and call to session_start() is returning false, which results in session manager throwing an exception with that particular message.
Likely not your customized code, unless you're changing session manager/handler code, or somehow altering the setup.php.
Suggest you open a bug ticket at tracker.moodle.org. Also double check sessions done with files, and not in DB.