$Id$ Authors: Jeff Buchbinder FreeMED Electronic Medical Record and Practice Management System Copyright (C) 1999-2010 FreeMED Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. --------------------------------------------------------------------------- Please note that this README file is meant to help with initially setting up FreeMED. If you are still having trouble, try the FreeMED support list, support@freemedsoftware.org for community-based support. ********************************************************************** ERRATA * index.php has to be added in /etc/apache2/?????.conf under the list of valid index files. * These are to be installed in /usr/share/freemed, and a virtual directory alias should be made in the Apache2 configuration files, as well as giving read perms to Apache. * Code is annotated with an author if the primary author is other than jeff b * MySQL version 5.0.20+ is required. * Since FreeMED involves a fairly hefty codebase, php optimizing tricks, such as the bware_cache module or the Zend Optimizer should be used to minimize load times. APC is also available (apc.communityconnect.com), as well as the venerable (but largely unmaintained) Turck MMcache (http://turck-mmcache.sourceforge.net/). **************************************************************** INSTALLATION 1) Make sure that MySQL and all of its libraries are properly installed on your system. If you are planning on using a MySQL server located on another box, be sure that the client libraries are installed on your FreeMED box. 2) Make sure that PHP is installed, with MySQL support. Most distributions require a separate module (php4-mysql, php-mysql) for MySQL support. 3) Install the FreeMED package: # cd /usr/share # tar zxvf /location/to/tarball/freemed-version.tar.gz which will extract the .tar.gz file to /usr/share/freemed/. If you run Redhat or Debian, you can use the precompiled packages, which will render instructions 6 through 9 unnecessary. You can also install from the subversion repository: # cd /usr/share # svn co http://svn.freemedsoftware.org/freemed/branch/BRANCH freemed will install the development version, where BRANCH is the code series. For example, BRANCH=0.8.x will check out the 0.8 series. 4) Edit your Apache configuration files to associate .php files with php, as well as setting index.php to be one of the default indexes. Also set up access and a directory alias for FreeMED. This is accomplished with the following lines: DirectoryIndex index.php index.php (et cetera...) AddType application/x-httpd-php .php Alias /freemed /usr/share/freemed Options Indexes Includes ExecCGI MultiViews FollowSymLinks AllowOverride All Order allow,deny allow from all 5) HUP apache (killall -1 httpd) to force it to reload its configuration files. Optionally you can use "/etc/init.d/apache2 restart" or its equivalent in your distribution. 6) NOTE: THIS STEP IS SUPPOSED TO BE PERFORMED BY FREEMED. IF IT IS NOT, YOU WILL HAVE TO DO THIS MANUALLY. Create the database with the command "mysqladmin -p create freemed" (if you are using MySQL). (The setup wizard also does this.) Please note that if you do not give FreeMED's MySQL user permission to the FreeMED database, it will generate an error. Check MySQL's manual for the "GRANT" command for more information on this. Adjust the memory limit in your php.ini file to be 64M. It is by default set to 8M, which causes errors, since FreeMED requires more memory than that for some of its functions. 7) Try to load http://localhost/freemed/install.php in your web browser. This should take you through a wizard which will help you set up FreeMED. You may now use FreeMED. Congratulations! ************************************************************* TROUBLESHOOTING Q: I get an SQL connection error. What's wrong? A: Try using the commandline clients for your SQL server. (For MySQL, this is simply "mysql -u (user) -p") If this works and you still can't log in with FreeMED, you may not have created the FreeMED database properly. You can log into the administrative console and add the database with the command "CREATE DATABASE freemed;". If this still does not allow you to connect, check your username, password, host, and table settings in lib/settings.php in your FreeMED installation. If you haven't set these properly, FreeMED will be unable to communicate with the SQL backend. If this still does not work, there is a chance that the machine or account that FreeMED is using does not have proper access rights on the SQL server. Please consult your SQL server documentation if this is the case.