Tried out Ubuntu 16.04, which uses PHP-7 and MYSQL-5.7 on the most recent development codebase and noted some issues(as an aside, I’m actually in the slow process of changing over to another laptop that will use Xubuntu 16.04).
Second fix was to deal with STRICT SQL, which is now on by default in MYSQL-5.7. This was done by simply turning it off within OpenEMR(without touching the server settings).: Fix STRICT SQL bug. · bradymiller/openemr@ca3c5a3 · GitHub
Third fix is just prelimnary to get it working. And involves the following sql error on install:
Unable to execute SQL: CREATE TABLE lists_touch ( pid bigint(20) default NULL, type varchar(255) default NULL, date datetime default NULL, PRIMARY KEY (pid,type)) ENGINE=MyISAM due to: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead
AND HERE IS THE PRELIM FIX: INTERIM Working on fix of lists_touch table regarding bug in mysql 5.7 · bradymiller/openemr@594f9c3 · GitHub
(this is prelim because likely need to also deal with this in the upgrade script also)
After the above fixes, the current OpenEMR development codebase appears to be working very well with PHP-7 and MYSQL-5.7 with no warnings or errors (except for the Zend/Care Coordination module which has lots of warnings, but no errors). Thank you to Practice Provider, whom did a monumental amount of work to make OpenEMR PHP7 compliant, for making this happen! (As an aside, do note that OpenEMR 4.2.1 will break horribly with PHP-7 and MYSQL-5.7)
I think items 1 and 2 above are ready to go into the codebase(please review them, if possible). Still working on best method for item 3(again, please feel free to review and provide feedback on that one also).
All above changes worked well on more extensive testing. So, committed them to the codebase.
Regarding the STRICT SQL commit, I see this as only a temporary fix. The hope is that OpenEMR will support STRICT SQL in the future, and then the commit can be reverted. I placed this project in the Active Projects page, so hopefully somebody(or organization) will pick it up in the future: http://www.open-emr.org/wiki/index.php/Active_Projects#Support_STRICT_SQL
Regarding the PRIMARY key not being able to be NULL ended up being an easy fix and don’t need to worry about it in the upgrade. Turns out earlier versions of MySQL basically just ignored this and wouldn’t allow a PRIMARY key have a default NULL setting without throwing an error.
Now that Ubuntu 16.04 has been released and PHP7 (and MySQL 5.7) are now mainstream, I think we need to think about releasing next version of OpenEMR (since version 4.2.1 is not even close to being compatible with PHP7). Rather than the new release being called OpenEMR 4.3.1, it will likely be called OpenEMR 4.2.2(to continue to to have MU2 certification), and should probably try to get it out within the next several weeks. Thoughts?
The incompatibility that fsgl linked to above has already been addressed in the development codebase(Practice Provider migrated the entire codebase from mysql to mysqli, which is supported in PHP7).
I just committed a nasty PHP7 related bug here (it was breaking the patient summary screen items that gets brought in by the interface/patient_file/summary/stats.php script):
We should avoid the use of the @ in the codebase(which is rarely used for good reason), which essentially hides php errors. Because line 100 of library/classes/Controller.class.php contained an @ in the function call, there was no reporting of the fatal error. After numerous echo and error_log debug calls and several “timeouts”, was finally able to pinpoint what should of been a simple bug fix (PHP7 throws fatal error if ‘break’ command is in the wrong place, while PHP5 didn’t)
Since we are starting to prepare for a release, would be good if any folks could start also testing the development codebase with PHP7 and report any bugs. Also, if there are any Windows gurus out there, testing the most recent development codebase with the most recent XAMPP package(the one here https://www.apachefriends.org/download.html with PHP 7.0.5) would be very helpful.
Brady,
Doing an install of this from scratch on new 16.04. Is there an updated dependency list of apt that need to be installed. php7 is pre-installed, but what about the apache-mods php-soap, php-curl etc …
To make this easy, there is a commandline section there where can copy/paste it
easily. Also note the 2 phpenmod commands for mbstring and mycrypt(I am 95%
positive these are both needed, but still in process of testing; even if
not needed, though, these commands will not cause any problems).
I don’t think those cause any issues, though(ie. more like warnings). There is a serious showstopper to avoid, though, that I didn’t mention. Need to ensure set a root mysql password during the install of the mysql package (ie. do not make it blank). The mechanism in mysql 5.7 for authentication basically seems to break if install it without a mysql root password.
(note MariaDB does have some “work around” commands since it doesn’t allow the user to set a mariadb root password during the install)
Now on to Debian and prior Ubuntu versions (one of the goals for this is to try to figure out a way to continue to have only 1 ubuntu/debian package for all of these OS’s like we have in the past, but will be tough since the packages list and bring in the dependencies; I am not very optimistic at this point).