Common Installation Problems

From OpenEMR Project Wiki
Revision as of 21:31, 17 April 2012 by Bradymiller (talk | contribs) (10 revisions: Common_Installation_Problems)

After Installation

No date shown in title bar, no calendar

A fresh OpenEMR 3.2.x install suffering from broken timezones

Problem

I just installed OpenEMR, and when i login, the place where the calendar should be is blank, and the bar across the top shows no date. whats gone wrong?

Confirming

PHP is probably having a timezone problem. to confirm this, drop the following contents into a file in apache's root (the place your openemr/ directory is), and try loading it with your web browser:

<?php
echo "hi " ; 
echo date(time());
echo " there" ;
?>

when you load that, you should see 'hi there', with the current date in the middle of it(represented as a string of numbers). if you just see "hi ", this means this is likely your problem.

If you enable display_error_messages=On in your php configuration (/etc/php5/apache2/php.ini on my machine), you should see something similar to:

hi
Fatal error: strtotime() [<a href='function.strtotime'>function.strtotime</a>]: Timezone database is corrupt - this should *never* happen! in /var/www/timetest.php on line 3

Possible Solutions

Make sure that /etc/localtime/ is readable as the user you run apache as(www-data on debian). Make sure you have timezone info packages installed (tzinfo on debian).

Now, make sure you have a timezone selected. because I was Doing It Wrongtm, on my machine, there was no timezone selected. running 'dpkg-reconfigure tzdata' and selecting a timezone fixed my problem.

Confirming the Fix

Other than the obvious "yay! i see the calendar again!", when the fix is working, the previous script will instead return something similar to:

hi 1258691922 there