4.2.0 installation problems on Yosemite

blatta wrote on Friday, January 23, 2015:

I’ve been able to successfully run 4.1.3-dev on my new MacBook Pro running Yosemite 10.10.1. I’ve been trying to recondition an older MacBook Pro (running the same operating system) into a backup server, however, and in so doing have been trying to install the new OEMR 4.2.0 onto it. I install with all the same options and tweaks as with 4.1.3-dev and get what appears to be a functional installation (I can log in as admin, etc.). The MySQL openemr database portion is functional (as evidenced by my ability to access and manipulate it from the command line however somehow the OpenEMR web-based interface isn’t making proper contact with the underlying database (at least that’s my interpretation).

Specifically, when I try to create a new user (Administration->Users->Add User) I fill in all the fields but when I press “save” I get the message “Failure during database access! Check server error log.” and nothing is added to the database (I checked from the command line). I’ve searched but cannot find the location of the aforementioned error log.

Other things work well. For example, I can add a pharmacy within the Practice Settings area. On the other hand, when I attempt to add a new facility I get another failure (Error: Incorrect integer value: ‘’ for column ‘service_location’ at row 1). Notwithstanding this, I know the table works and is filled because one of the first things I did after installing the system was to use a facility_install.sql script (mysql> source facility_install.sql from mysql command prompt) to automate the process of installing the several facilities at which I work and they show up on the facilities screen.

I’ve tried copying the /etc/apache2/httpd.conf and /etc/php.ini files from the fully functioning computer to the new computer (both set up with the same operating system and updates - just a different version of OpenEMR) and then restarting the webserver but the results are the same.

Any ideas? Where do I go from here? I feel myself slowly slipping into the abyss. I’ve always been able to solve my problems with a few Google searches and a little experimentation but this one has me perplexed.

Edit: For the record, I’ve also played around with installing OpenEMR over the top of a “prefab” AMP stack (both XAMPP and MAMP). XAMPP installed fine but I couldn’t get a clean OpenEMR installation over it. MAMP appeared to install just fine and I was able to get a working OpenEMR installation, so I could go in that direction, but I don’t see why it shouldn’t be possible to do this directly without having to install a whole bunch of other software that I don’t want, especially when I had previously been able to easily accomplish everything simply by enabling the pre-existing webserver/PHP stuff and installing MySQL.

fsgl wrote on Saturday, January 24, 2015:

Long standing Forum members can tell you how tough installation had been in the past with separate installation of stack components. I remember Brady said it was well nigh impossible.

As to the question of “shovelware” with stacks, it is the price of doing business. Tomcat & Filezilla have not been started in my production copy. They have no bearing on day-to-day operations. Over time there should be more files from OpenEMR than the those for XAMPP.

Uninstall is far easier if all files are in the stack folder. Linux users can attest to uninstall related Alopecia.

The sense of self-reliance may be a bit diminished, but no one is omniscient (& would you want the responsibility to go with it?). We will do our best to help, even if it kills us.

For starters, how did you handle this step?

blatta wrote on Saturday, January 24, 2015:

Well, I selected the aforementioned option and pressed “Continue”. No problems whatsoever. I’ve probably installed the system over three dozen times with all my experimentation. If I had problems I probably would have gone to the installation script (opener/sql/database.sql), broken it down into smaller and smaller fragments if necessary, and installed it from the mysql command prompt.

fsgl wrote on Saturday, January 24, 2015:

I presumed that at no point prior to the OpenEMR setup, in the configuration of MySQL, you did not create a database nor create login credentials for it.

How did you handle Step 2?

MySQL login credentials are common sources of setup problems.

.

blatta wrote on Saturday, January 24, 2015:

No, I let the OEMR setup routine handle all the database creation stuff. It did it without a hitch.

When one installs MySQL I believe that the default root password is empty (which is a major security flaw). I manually set the root password ($ ./mysqladmin -u root password ‘yournewrootpasswordhere’) from the /usr/local/mysql/bin directory prior to installing OEMR and then used that in the Root Password field. I believe that the opener password and the admin user password can be set to pretty much whatever you want.

Aside from that the install was a snap. I just followed the instructions and went from there.

fsgl wrote on Saturday, January 24, 2015:

Where is the Document Root presently located with 4.1.3?

Have you tried upgrading?

If not, pretend you are upgrading from 4.1.2 despite the fact that you have 4.1.3 installed. I think Stephen Waite did the exact same thing without difficulty.

If upgrading does not work, the fallback position is a fresh install.

No MySQL password is certainly a security hazard, but I think part of the problem is assigning a root password prematurely or using the wrong set of credentials.

blatta wrote on Saturday, January 24, 2015:

You can put the document root wherever you want, but I keep it in the default (/library/webserver/documents/).

I have tried installing 4.1.2 with the intent of then attempting to upgrade to 4.2.0 but for whatever reason the install didn’t work (I got a white screen when I browsed to localhost/openemr/setup.php). I’m not certain why as I’ve never had that problem before.

I don’t want to attempt upgrading my current main computer from 4.1.3-dev as if it doesn’t work then I’m left with nothing to experiment on. I think it would be much better to figure out how to get a good bullet-proof installation that can be repeated as necessary.

fsgl wrote on Saturday, January 24, 2015:

In that case, if you are able to use the older MacBook for a fresh install, we will presume that this second device:

  1. is on Yosemite.
  2. built-in Apache & PHP, both have been turned off as defaults.
  3. MySQL has not been installed.

We want a clean slate on another machine & no conflicts with nor corruption of applications in the newer MacBook.

Let’s use this webpage for an install with a stack.

Because the steps have been spelt out, troubleshooting will be easier.

fsgl wrote on Saturday, January 24, 2015:

Almost forgot.

Do not set the MySQL root password in Step 2 of the OpenEMR setup. I probably will need to edit that part of the webpage.

Both the MySQL root password & the OpenEMR login credentials can be done later. Just keep it simple for now.

blatta wrote on Saturday, January 24, 2015:

Now you’re making things more complicated but yes, things are more or less as you stipulated. This is a fresh, clean Yosemite install on my older MacBook. I’ve installed Yosemite multiple times on it and can now accomplish to process in approx 15-20 minutes from blank hard drive to functioning OS.

My initial attempts (which had previously been successful on older versions of the software) had been to manually install MySQL and manually enable Apache/PHP, thus effectively creating my own AMP stack.

I have previously installed with the instructions for the prefab AMP stack as indicated in your link. I was never able to successfully install with XAMPP. I kept getting various warnings and notifications. As far as I could tell they weren’t necessarily fatal errors but they did get in the way and in the end, when I tried to navigate to the OEMR/Administration/Globals section I was presented with a page that I couldn’t navigate further. Ultimately, it didn’t work.

I have had much better luck with the MAMP stack. It pretty much works out of the gate, although I did have to change the ports (Apache:80, Nginix:82, MySQL:3306) and select the PHP version (5.6.2) from Preferences. Furthermore, several references have to be changed (for example, the mysql binaries are now in /applications/mamp/library/bin rather than /usr/local/mysql/bin) and I needed to scan the httpd.conf and php.ini files and possibly make a few location changes. All in all, it wasn’t too hard.

Also, I had done most of this reinstallation stuff prior to reading your note. As such, I had set my MySQL root password as noted above and referenced it as such in OpenEMR Setup, Step 2, as part of the OpenEMR installation. This has never given me a problem during previous installations and didn’t this time either.

Currently, I’ve been able to get 4.2.0 up and running and manually add the basic office users (the original problem). I’ve also been able to add all my other customizations (address book, codes, prices, etc.) from the command line through my custom .sql files. Effectively, I seem to have gotten beyond the previous choke point and have what I presume will be a functional system. I’d still like to be able to somehow set things such that MAMP will run automatically and restart the MySQL and Apache servers when the system is rebooted (after a power outage, for example) so that non-administrative users can restart the system/EMR without an administrative password but I presume that will eventually make itself clearer to me. I presume that it will simply be some variation of the startup scripts that I used back with 4.1.2.

Finally, it just pisses me off that I haven’t been able to wrestle this problem to the ground like I have been previously.

fsgl wrote on Saturday, January 24, 2015:

Others can offer assistance.

blatta wrote on Sunday, January 25, 2015:

! Everything’s working well this AM !

The system’s up and running on the server. I can log on from other computers on the network and I figured out how to get it to run automatically on startup.

I think I might go live this week! It’s been a long time coming.

blatta wrote on Tuesday, February 24, 2015:

Well, this turned out to be more complicated than I expected. In the end, however, things seem to be working again. Ultimately, without looking at it too closely it appears that within openemr/interface/usergroup/usergroup_admin.php at approx. line 214 there’s an error in how the password expiration days are handled such that if passwords are allowed to persist indefinitely (given a value of 0 in the Admin/Globals/Security section) then $exp_date isn’t given a value. That appears to cause the next $insertUserSQL string to fail when used in the insert command. The simple workaround is to ensure that Default Password Expiration Days are given a non-0 value. Alternatively, this small amount of code would appear to need to be revised. Perhaps I’ll look into it later.

Otherwise, I can confirm that it’s easy to install a functioning copy of OEMR on Yosemite - either the server or regular version - using more or less the same instructions as one might use for Linux, without necessarily resorting to using MAMP.

blatta wrote on Friday, February 27, 2015:

For what it’s worth, my last post might have over-simplified things a little. Further experimentation has led me to believe that if I install MySQL version 5.5.xx then there’s a degree of latitude regarding the declaration of default values for text-type fields (at least on a Mac). With the more current 5.6.xx versions (maybe some of the earlier 5.6 versions work but I’m not certain at which point they begin to fail), however, that latitude becomes an “error” and several different tables don’t install. Worse, there’s no notification that the installation is not complete. This may have played something of a role in my problems as well, as everything is once again working just fine with the 5.5.42 version.

I’m not planning on messing with this any more and I’m just finishing up this thread in case someone else has similar problems. In the meantime I’ll just continue on with my (slightly) outdated version of MySQL and trust that it won’t create other problems.