Read about OpenEMR's Response to the COVID-19 Pandemic at https://www.open-emr.org/covid19/

Blank screen on first start of OpenEMR 5.0.2

Situation
I installed OpenEMR 5.0.2 on Lubuntu 20.04 LTS as per the instructions here: https://www.open-emr.org/wiki/index.php/OpenEMR_5.0.2_Linux_Installation
The installation carried through apparently successfully, but on clicking the link Click here to start using OpenEMR, I get a blank screen.

OpenEMR Version
5.0.2

Browser:
I’m using: Firefox

Operating System
I’m using: Lubuntu 20.04LTS

Logs
Did you check the logs? Was there anything pertinent in them?

‘’’[Tue May 05 16:36:02.104205 2020] [php7:error] [pid 32509] [client ::1:54082] PHP Fatal error: Uncaught Error: Call to undefined function mysqli_query() in /var/www/html/openemr/vendor/adodb/adodb-php/drivers/adodb-mysqli.inc.php:788\nStack trace:\n#0 /var/www/html/openemr/vendor/adodb/adodb-php/adodb.inc.php(1268): ADODB_mysqli->_query()\n#1 /var/www/html/openemr/vendor/adodb/adodb-php/adodb.inc.php(1246): ADOConnection->_Execute()\n#2 /var/www/html/openemr/library/ADODB_mysqli_log.php(26): ADOConnection->Execute()\n#3 /var/www/html/openemr/library/sql.inc(52): ADODB_mysqli_log->Execute()\n#4 /var/www/html/openemr/interface/globals.php(248): require_once(’/var/www/html/o…’)\n#5 /var/www/html/openemr/interface/login/login.php(33): require_once(’/var/www/html/o…’)\n#6 {main}\n thrown in /var/www/html/openemr/vendor/adodb/adodb-php/drivers/adodb-mysqli.inc.php on line 788, referer: http://localhost/openemr/setup.php’’’

Did you install mysqli and ADODB the connectors for the database?
Also what I do is I let php print errors on the screen at the beginning. It just makes it easier for me. It cam get a bit tough.
Please check out this page to make sure you have all the packages you need:

https://www.open-emr.org/wiki/index.php/OpenEMR_System_Architecture#OpenEMR_Dependencies

@gutiersa Thank you for your reply. PHP 7.4 in installed and I can only assume that php-mysqli is part of that. libphp-adodb is installed. I looked at the link you shared. There were one or two packages for Ubuntu which were not installed, so I installed them. The only one I could not install (unavailable) is php-gettext but I am told that it is part php7.4-cmmon, which is installed. After installing the missing packages and restarting apache2, the result is unchanged: a blank screen.

I notice there is something wrong with my mysql installation:

robert@roberts-work-laptop:~$ mysql
ERROR 1045 (28000): Access denied for user 'robert'@'localhost' (using password: NO)
robert@roberts-work-laptop:~$ sudo mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

I am guessing this is relevant to my problem, but I have no idea what to do about it.

I can’t see a problem with the MySQL installation. It’s just you are providing a wrong password thus getting the access denied error.
you can use mysql -u{username} -p command and it will ask you for your MySQL password which i suppose you remember.
e.g. mysql -urobert -p

@im-Amitto Thank you for your reply.

robert@roberts-work-laptop:~$ mysql -urobert -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'robert'@'localhost' (using password: YES)

I am 98% certain of my password. But if it is wrong, how would I recover it or reset it?

You are not providing a password.
there are instructions you need to follow
In the openemr directory there is a Documentation directory, in there there is a file named INSTALL
You need to read that. You can also find it here:

openemr/INSTALL at master · openemr/openemr · GitHub

Also, which version of Mysql are you using?

@gutiersa Hello, why do you say I am not providing a password? I did provide a password! The password is never shown in the terminal window, it is hidden. The code I posted is copied from the terminal window. It says “using password: YES”.

Regarding the installation instructions, they are these same as those on the wiki page (the link I provided in my first message), and yes, I followed them.

Mysql 8.0.20

Thank you.

sorry, I had not finished reading the thread.
I had read up to here:

robert@roberts-work-laptop:~$ mysql
ERROR 1045 (28000): Access denied for user ‘robert’@‘localhost’ (using password: NO)

Openemr does not yet work with Mysql 8. You can ready my threads from the few recent weeks. Let me find them for you If you want to trouble shoot the problem and get it to work:

The Mysql 8 Challenge for Developers

If you look toward the more recent exchanges you will see some instructions. You need to use mysql_native_password instead of caching_sha2_password plugin for the server.

Secondly, when installing mysql8, the root password is automatically created using the latter. You would need to make a new root user and grant privileges separately using the former.
But there are other problems. I just went back and installed the mysql 5.7 server

https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html
Check this out

Hmmm… That’s distressing. I just upgraded my OS on my work laptop without a thought that I might not be able to use OpenEMR on it. All my patient data are on the database. Luckily I have a home computer running Mint 18.04 with MySQL 5 (if I remember correctly). I had used the restore script to clone the database, then successfully upgraded from OpenEMR 5.01 to 5.0.2, so at least I can take my patient notes home and add them to the database. Not ideal though. Maybe on my work laptop I could use MariaDB instead… Would that work?

Thank you, but I have found that “sudo mysql -uroot -p” works. Is that normal behaviour? Shouldn’t I be able to access it as robert?

By default mysql server only have a root user which has all the privilege.
If you want to use robert then you first need to create a user robert in mysql.
To list out all existing mysql users, you can use the below command.
select user from mysql.user;

Well, if that’s the default behaviour, I’ll leave it at that. The only reason I installed mysql is in order to use openemr, but I understand from Sandra Gutierrez on this thread that in any case openemr does not work with mysql 8.

Yes, you may use Maria db or mysql 5.7

I have been using mysql 8.0 with openemr for some time now and haven’t got in any problem yet but i am using the master branch of openemr so i am not sure about released versions.

Any idea when the .deb installation package might become available?

Thank you for your help. One last question. Could an openemr backup made with mysql be restored onto an openem installation using Mariadb?

I really don’t know anything about Mariadb. But others in this forum may be able to answer that. Also, you can try Mariadb forums. I guess it would depend on the version of Mysql. I believe that is the reason there was the fork in the first place.
I will post some commands for Mysql8 as soon as I find them, if you would like to keep trying it.
BTW, I could not get mysql8 to work from a different host.

In Mysql8, you can no longer create a user with the GRANT command.
Here are some useful commands you may be able to use for mysql8. They are correct as of the date of this post.
This must be in your my.cnf file, under [mysqld]:

default-authentication-plugin = mysql_native_password

these are the commands for the mysql command line:

CREATE USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘secretpassword’;
GRANT ALL ON . TO ‘root’@‘localhost’;

Flush priviledges is no longer needed!

I would love to use openemr with MySQL8. Is your version of openemr very different from the 5.0.2_2 release?