OpenEMR 4.1 Lion Server

From OpenEMR Project Wiki

OpenEMR on Lion Server.

If you try this on Lion without server, some locations will need to change.
Install and setup MySQL, PHP and Xdebug according to this web site: http://akrabat.com/php/setting-up-php-mysql-on-os-x-10-7-lion/
When editing php.ini
Change:
short_open_tag = On
max_execution_time = 60
max_input_time = 90
post_max_size = 30M
upload_max_filesize = 30M
Check:
memory_limit = 128M
display_errors = Off
log_errors = On
register_globals = Off
file_uploads = On
Use terminal to make mysql secure:
mysql -u root -p
mysql> DROP DATABASE test;
mysql> DELETE FROM mysql.user WHERE user = '';
mysql> FLUSH PRIVILEGES;
mysql>quit;
Create a plain text file named openemr.conf and file it with this:
<Directory /Library/Server/Web/Data/Sites/Default/openemr-4.1.0/sites/default/documents>
order deny,allow
Deny from all
</Directory>
<Directory /Library/Server/Web/Data/Sites/Default/openemr-4.1.0/sites/default/edi>
order deny,allow
Deny from all
</Directory>
<Directory /Library/Server/Web/Data/Sites/Default/openemr-4.1.0/sites/default/era>
order deny,allow
Deny from all
</Directory>
Save it on the desktop and move it to /private/etc/apache2/sites in terminal
sudo cp -p ~/Desktop/openemr.conf /etc/apache2/sites/openemr.conf
In the Finder: Go->Go to Folder->/Library/Server/Web/Data/Sites/
Get Info for Default
Change Sharing & Permissions so all groups can Read & Write, remember what it was to put it back later.
Download, expand and move openemr-4.1.0 to /Library/Server/Web/Data/Sites/Default
In terminal:
cd /Library/Server/Web/Data/Sites/Default
ln -s openemr-4.1.0 openemr
cd openemr
sudo chmod 666 library/sqlconf.php
sudo chmod 666 interface/globals.php
sudo chown -R _www:_www sites
sudo chown -R _www:_www library/freeb
sudo chown -R _www:_www gacl/admin/templates_c
sudo chown -R _www:_www interface/main/calendar/modules/PostCalendar/pntemplates/cache
sudo chown -R _www:_www interface/main/calendar/modules/PostCalendar/pntemplates/compiled
Open up web-browser and point it to the installation script at http://localhost/openemr/setup.php
When done, change back Sharing & Permissions on /Library/Server/Web/Data/Sites/Default.

Good luck and enjoy.


These intructions were initially taken from the following forum (author is Bruce Barton): http://sourceforge.net/projects/openemr/forums/forum/202506/topic/4781253