Calendar "Session initialization f

latinaviator wrote on Thursday, August 26, 2010:

This morning we found our main window displaying the following message “Session initialisation failed”, can anyone tell me how to fix this issue and why or what might have cause it?

Our installation is on a windows based computer and for the last three months it’s been running without any issues.

thanks

visolveemr wrote on Thursday, August 26, 2010:

Hi,

In OpenEMR “Session initialization failed” occurs when the application DB is not able to connect or when the respective (here openemr_session_info) table is corrupted.

Try to check & repair the table and access the application.
     check table openemr_session_info;
     repair table openemr_session_info;

In the OpenEMR code level - it is defined in the file ./interface/main/calendar/includes/pnAPI.php
      list($dbconn) = pnDBGetConn();

Hope this helps.

Thanks
ViCareplus Team,
services@vicareplus.com

latinaviator wrote on Thursday, August 26, 2010:

visoveemr,

Thank you, I got it figured out at about 2 a.m. this morning, I looked at every single table (108) until I found the corrupted table. openemr_session_info was the guilty party, my solution was to take a copy of the table from the original install and replace the corrupted one, as I am trying to learn the ins and outs of this software, at 2 a.m. that seemed like the most appropriate solution. The replacement table seems to be working fine, now the questions would be, why did it get corrupted? how do I prevent it from happening again? and was my solution the safe enough not to create additional issues?.

Thanks,

Michael

nthurman wrote on Thursday, August 26, 2010:

Michael,

database issues can occur without warning and “always” when you don’t need one.   It may be due to a hard disk error, memory error, process failure, or any number of other issues.   You may (hopefully) never see this issue again or it may happen in the next 10 minutes.  That is why we stress you make regular backups of your system and database.   At least daily but more frequently (hourly) is better.   Depending on the size of your practice you may want to invest in an external hard drive (or several) to keep regular off-site copies of your system.

I keep hourly dumps of the database, nightly backups of the entire system to a local NAS, and weekly archives to an off-site (encrypted) facility.   This may seem extreme but, having worked in this industry for many years, I have first hand experience watching hard drives turn into iron filings.

Look on the wiki if you need examples of backup scripts and feel free to email me if you have questions.