You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
ocsreports keeps the mysql object in the $_SESSION superglobal variable. For a cronjob like the cron_wol.php keeping some data in a session for the next run ist not needed so do a proper cleanup and destroy the session at the end of the file. At the moment on every run of one of the cronjobs a new session file ist saved that is not needed in the future anymore.
Describe the solution you'd like
Add two lines at the end of every cron_*.php file to destroy the session after the script has done its work: $_SESSION = array(); session_destroy();
Describe alternatives you've considered
An alternative would be to not save the MySQL object in the session but in a normal global variable that that can be used in every function by the global keyword. This would keep the session generally cleaner but will have some bigger reworking of the code to do. My first solution would be a quick and easy fix.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
ocsreports keeps the mysql object in the $_SESSION superglobal variable. For a cronjob like the cron_wol.php keeping some data in a session for the next run ist not needed so do a proper cleanup and destroy the session at the end of the file. At the moment on every run of one of the cronjobs a new session file ist saved that is not needed in the future anymore.
Describe the solution you'd like
Add two lines at the end of every cron_*.php file to destroy the session after the script has done its work:
$_SESSION = array(); session_destroy();
Describe alternatives you've considered
An alternative would be to not save the MySQL object in the session but in a normal global variable that that can be used in every function by the global keyword. This would keep the session generally cleaner but will have some bigger reworking of the code to do. My first solution would be a quick and easy fix.
The text was updated successfully, but these errors were encountered: