Installation script changes

bradymiller wrote on Monday, February 09, 2009:

hey,
  While getting php-gacl embedded, turns out there are several more files/directories that need global writing permissions.

OpenEMR needs:
library/sqlconf.php
interface/main/calendar/modules/PostCalendar/pntemplates/compiled
interface/main/calendar/modules/PostCalendar/pntemplates/cache

phpGACL needs:
gacl/gacl.ini.php
gacl/gacl.class.php
gacl/admin/templates_c

Since dealing with changing permission and creating some of these directories are a minefield for new installers, I tried to deal with this in OpenEMR’s install setup.php script.  The first screen now checks for existence of proper file/directory permissions (along with how to fix them) before moving on to installation.

Did this on a bit of a whim. If others don’t like this, easy to change back.  But I do think this will avoid many installation problems among new users.  These changes, in addition to embedding of php-GACL and billing, now make OpenEMR a complete one step installation medical office management suite.

pretty friggin cool

-brady

cfapress wrote on Monday, February 09, 2009:

Nice Job Brady!

Anything to make the installation easier deserves kudos.
(http://en.wikipedia.org/wiki/Kudos)

bradymiller wrote on Tuesday, February 10, 2009:

hey,

Made a lot more changes to the install script to attempt to avoid lots of errors new installers make.

Here are the screenshots with quick descriptions:

http://www.sparmy.com/pics/screenshot20.jpg
This is the first screen, and starts to check needed files, directories, and permissions. If somethings not right it tries to give instructions.

http://www.sparmy.com/pics/screenshot21.jpg
Here’s what the first screen looks like when all the file, directories, and permissions have been verified. (this way all this stuff is verified before any database things happen, since new users have difficulty dropping databases etc.)

http://www.sparmy.com/pics/screenshot22.jpg
No change here from original script.

http://www.sparmy.com/pics/screenshot23.jpg
Note the new PATHS: section at the bottom. The absolute path is automatically created, so should avoid errors. (This will eliminate the step of users having to edit the /interface/globals.php after running script.)

http://www.sparmy.com/pics/screenshot24.jpg
Note the writing of the sqlconf.php and globals.php are here (basically all openemr install stuff is done here)

http://www.sparmy.com/pics/screenshot25.jpg
This is where is the embedded php-gacl is configured. Note that administrator access is given to whatever admin user is created in step 2/3.

http://www.sparmy.com/pics/screenshot26.jpg
Changed this quite a bit from original.

I’m hoping a windows users tries this thing out to make sure there’s no big bugs.

-brady

bradymiller wrote on Thursday, February 12, 2009:

hey,

I’ve tested the openemr setup.php script on both linux and windows xp successfully (just committed some changes to get it to work on windows).  These changes should really simplify installation for openemr 3.0; see above screenshots for more details.  Let me know if any bugs

-brady

ideaman911 wrote on Friday, February 13, 2009:

Brady;

Dr Bowen & I have  been working on the Windows stuff, and I have a series of fixes for 2.9.1dev so I will be very interested in testing the ver 3.x when it is released.  I presume your install will be part of that "package" and that the current Xampp release will work with the new release?

Please let me know as soon as the 3.x is available.  Since I am not a Linux guy AT ALL, tar and chown are foreign languages to me.  I think Dr Bowen plans to make the 3.x available as a Zip file, which is how I can test it.  But I will do so within a few days at worst of its release in the zip form and post you with results.

Besides combining the gacl with the 2.9.1, are there other changes to OpenEMR I can expect as part of the 3.x?  And since I have been working with a "non-release" version (because it included the billing/accounting without needing SQLedger, which had fits with Windows installs), will the "databases already exist" selection work OK?  When I tried to do the 2.9.1 on top of a 2.9.0 install, it simply corrupted everything.  So we will want to assure the file rollover is seamless as a number of new Windows users have come on board recently.

I will plan to test virgin install as well as on top of 2.9.1 and post on all.

Thanks.

Joe Holzer

aperezcrespo wrote on Friday, February 13, 2009:

Hi Joe
   For tar you can use IZARC as a decompression utility.  chown is the equivalent of ownership.   chmod is the equivalent of attrib.

drbowen wrote on Friday, February 13, 2009:

Dear Joe,

The easiest way for you to get and test the changes is to download and install TortoiseCVS.  This will download a current version of the OpenEMR code.

To upgrade to the current version you need to apply any new SQL changes that have been introduced since the  current version you are using.  The development version that you  are using is almost identical to the stock OpenEMR code.

The SQL statements will be in:

openemr/sql/

and will be called:

2_9_0-to-2_9_1_upgrade.sql

You will just need to apply the changes that don’t exist in your version.

Then you swap the new openemr for the old openemr in:

c:\xampp\openemr

You will have to take care about any scanned documents that are in openemr/documents/

C:\xampp\openemr\library\sqlconf.php will need to be backed up and then placed into the new version.

Rod has recently written some scripts to help with this process.

Sam Bowen

bradymiller wrote on Saturday, February 14, 2009:

Questions to developers, especially Rod,

This section of install seems very misleading:
http://www.sparmy.com/pics/screenshot22.jpg

Do we even need this screen?  It mentions upgrading which is confusing, since this setup.php script doesn’t upgrade (it refers upgraders to the INSTALL manual when scripts starts).  Seems like the ‘I have already created the databases’ is only for users who can’t get mysql root access during running of script, thus needing to manually make an empty openemr database before running the script; is this right?  If we need to keep it, I’ll probably remove the mention of upgrading.

-Brady

bradymiller wrote on Sunday, February 15, 2009:

hey,

Here’s the next round of modifications to the setup.php installation script.  Again, goal is to make it easier on first-time installers and avoid errors.  I think it’s done except for some possible minor cosmetic changes.  Posted screenshots with descriptions below.

http://www.sparmy.com/pics/screenshot30.jpg
This is the first screen, and starts to check needed files, directories, and permissions. If somethings not right it tries to give instructions. The goal of this is to make sure everything’s right before the actual installation, since lots of first-timer installation errors are related to missing directories or improper permissions. Also put a link to the INSTALL text file for further reference.

http://www.sparmy.com/pics/screenshot31.jpg
Here’s what the first screen looks like when all the file, directories, and permissions have been verified.

http://www.sparmy.com/pics/screenshot32.jpg
Removed any mention of upgrading, since this script doesn’t upgrade.

http://www.sparmy.com/pics/screenshot33.jpg
Clarified some of the instructions and re-organized it a bit.  To avoid the common error of manually putting incorrect paths into the interface/globals.php, it is now done automatically (OPENEMR PATHS: section).

http://www.sparmy.com/pics/screenshot34.jpg
All the openemr configuration stuff is here including creating/configuring the MySQL database, writing MySQL configuration to the library/sqlconf.php file, and writing of paths to the interface/globals.php file.

http://www.sparmy.com/pics/screenshot35.jpg
The embedded php-gacl is configured here. Note that administrator access is given to whatever admin user is created in step 2/3.

http://www.sparmy.com/pics/screenshot36.jpg
Gave some instructions to avoid common problems including:
re-securing configuration problems
ensuring proper php.ini settings for patient documents
ensuring the documents and edi directories are secured from direct web access

Let me know if any bugs.

-brady

anojgoel wrote on Sunday, February 15, 2009:

i tried using the script in the latest cvs on XP and i get error. it works great in ubuntu.

the install of 2.9.1dev works but it does not have the gacl integration.

is the proposed release 3.0 based on latest cvs or 2.9.1dev?

please see my posting in the help section. i have used bothe firefox and IE, so it is not a browser issue.

https://sourceforge.net/forum/forum.php?thread_id=2981656&forum_id=202505

thanks

anoj

bradymiller wrote on Sunday, February 15, 2009:

hey,

Thanks for testing it. Just so you know I committed a new revision (lots of modifications) of the setup.php script several hours ago.

The proposed 3.0 release will be based on latest cvs.

Regarding windows, I’ve gotten install to work with XP and XAMPP 1.7.0.  php.ini file with both register_globals and magic_quotes set to off.

Regarding your error, not sure what it is (my windows experience is limited, though).  See the sessions thing, I’d clear your browser history (in Firefox do ‘Tools’->‘clear private data’ and ensure you clear the cookies.  To help with debugging, recommend setting in php.ini:
log_errors = On (so then you should get a more detailed logging of your error in the C:\xampp\apache\logs\phperror.log file)

I’m also curious what the installation script did to your interface/globals.php file (specifically the $webserver_root and $web_root variables) ?

What version of XP and XAMPP are you using?

Also just curious how your getting the most recent CVS version?

Also an important aside, and something I’ll include in installation instructions. php.ini variable display_errors needs to be turned off. This isn’t causing your problem, but will cause problems with anything using AJAX, such as the admin of access controls (acl).

-brady

anojgoel wrote on Sunday, February 15, 2009:

i have tortoise CVS installed and works great. http://www.tortoisecvs.org/

i get the CVS from the public release using anonymous login.
https://sourceforge.net/cvs/?group_id=60081
cvs -d:pserver:anonymous@openemr.cvs.sourceforge.net:/cvsroot/openemr login

the XAMPP and XP should not be an issue since the 2.9.1dev works.

will reinstall it again and try other suggestions like clearing the browing history etc. if it works on your windows install it must be a local issue on my end. i will actually try it on another computer and post back.

sunsetsystems wrote on Monday, February 16, 2009:

I think you are right.  The reference to upgrading seems inappropriate, however there may be cases where the user wants or needs to create the database (singular!) beforehand.

Rod
www.sunsetsystems.com

bradymiller wrote on Monday, February 16, 2009:

yep, i was very happy to change ‘databases’ to singular:
http://www.sparmy.com/pics/screenshot32.jpg

-brady

drbowen wrote on Tuesday, February 17, 2009:

Dear Brady,

Do the scripts in CVS already have what is needed to install gacl?

IE can I install the current CVS version and the gacl is already there or do we still need to download it separately?

I am looking forward to testing a new install in Windows and see if we can package and release the Windows version at the same time that we release OpenEMR 3.0.

Sam Bowen

bradymiller wrote on Tuesday, February 17, 2009:

hey,

php-GACL is already there.  There is no need for separate download or installation.  The days of freeB, sql-ledger, and php-gacl are past us.  Let me know how your windows install goes. I’ve gotten it to work on Windows XP, but would be great to get more independent testing done.

-brady

drbowen wrote on Wednesday, February 18, 2009:

Dear Brady,

While we are updating the installation scripts there a a few things that have been bugging me for years.

1) Can we not create the compiled and cache directories at

openemr/interface/main/calendar/modules/PostCalendar/pntemplates/

To keep the empty directories from being pruned we could a small text file in each directory.

2) Could we not allow the installing administrator to pick the initial administrative password instead of the default "pass"?

3) Andres has been promising me for years a script that helps us the number of installs.  Suggestions have been:

"Adding manual/autoupdate feature in openemr.  When a request for update is generated, it will send info back to oemr.org about the type of install, location of install (iplogging) and possibly uptime since last upgrade. This can also be accomplished by putting a simple request looking for update at each openemr start or if the system has been up for reasonable period of time.  This can cause the program to ping oemr.org with the active IP of the installing organization."

Of course, some feel this may be considered an invasion of privacy and I think the end user needs a toggle switch turn this feature off.  Having the program check for updates is something that most users will accept with the ability to opt out. 

Alternatively, we could encourage users to email me when they are installing or upgrading.

It is really critical for my grant writing to be able to measure the number of users and installations.

Sam Bowen, MD

whimmel wrote on Wednesday, February 18, 2009:

Some projects encourage the installer to send an email.  DJB’s qmail does this in the INSTALL file. For example:


That’s it! To report success:
       % ( echo ‘First M. Last’; cat `cat SYSDEPS` ) | mail djb-qst@cr.yp.to
Replace First M. Last with your name.

You could make this an option (opt-out?) in the installation/upgrade scripts.

bradymiller wrote on Wednesday, February 18, 2009:

hey,

There are actually 3 empty directories now with addition of phpgacl:
openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache
openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled
openemr/gacl/admin/templates_c

I have contemplated sticking README files in all these directories to see what happens (I’m not clear how these directories are utilized, but we could just do this and see what happens).

The last screen of install is already busy:
http://www.sparmy.com/pics/screenshot36.jpg

I suppose we could break this screen into two to facilitate a email address (what email do you want to use) and might as well stick link to the forums there to.

-Brady

drbowen wrote on Wednesday, February 18, 2009:

How does this affect the installation and initiation of gacl to control access to the openemr web pages?

I guess I am thinking a need a primer on how to start using the gacl the new way?

Sam Bowen, MD