Blank screen on first start of OpenEMR 5.0.2

Yes, I get a php configuration page.

Those are odd permissions. apache (www-data) likely will not be permitted to see this stuff. Try this hail mary.

sudo chown -R www-data:www-data /var/www/openemr

OK, now at localhost/openemr I get a white screen with this message:

“Check that you can ping the server mysql.”

Try

sudo chmod 666 /var/www/openemr/sites/default/sqlconf.php

Then see localhost/openemr where it lands.

check your php log.
check this out:

https://www.ionos.com/community/server-cloud-infrastructure/apache/how-to-fix-http-error-code-500-internal-server-error/

@rdh61 ,
Now need to work on the mysql connection. Guessing the settings in sites/default/sqlconf.php are not correct.
What happens if you do following at commandline using the credentials in sqlconf.php (substitute the <*> with var in that script):

mysql -u <$login> --password=<$pass> -h <$host>

See if that gets you into the command line mysql prompt. then exit and see if your root access is working:

mysql -u root --password=<mysql_root_password> -h <$host>

Just in case the above measurements fail this thread deals with similar issue trouble shooting “Check that you can ping the server mysql.”

Sorry about the delay in getting back to you. The credentials in sqlconf.php do not get me into a command line mysql prompt:

robert@robert-ideacentre-AIO-520-22IKU:~$ mysql -u openemr --password=MyPassword -h mysql
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (2)

This got the same result.

Thanks, I’ll check it out.

Thanks, I’ll check it out. Would that be the same as the Apache2 error log?

My Apache2 error log just after trying to access my login screen on localhost/openemr just now produced a number of entries:

[Mon Jun 22 17:53:34.179420 2020] [php7:warn] [pid 1030] [client 127.0.0.1:56290] PHP Warning:  mysqli_real_connect(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/openemr/library/ADODB_mysqli_log.php on line 188
[Mon Jun 22 17:53:34.179471 2020] [php7:warn] [pid 1030] [client 127.0.0.1:56290] PHP Warning:  mysqli_real_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/openemr/library/ADODB_mysqli_log.php on line 188
[Mon Jun 22 17:53:34.179644 2020] [php7:notice] [pid 1030] [client 127.0.0.1:56290] PHP custom error: from openemr library/sql.inc  - Unable to set up UTF8 encoding with mysql database: php_network_getaddresses: getaddrinfo failed: Name or service not known
[Mon Jun 22 17:53:34.179663 2020] [php7:notice] [pid 1030] [client 127.0.0.1:56290] Unable to set strict sql setting: php_network_getaddresses: getaddrinfo failed: Name or service not known
[Mon Jun 22 17:53:34.569391 2020] [php7:error] [pid 1030] [client 127.0.0.1:56290] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /var/www/openemr/vendor/adodb/adodb-php/adodb.inc.php on line 182

I am not sure, I use nginx and php-fpm. these are two separate applications and have separate logs. I don’t really remember with appache. You could see the apache log and see what it tells you. Maybe tomorrow I might start working with apache.

Yes, it is the same log I guess, because here are your errors.

mysqli_real_connect(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/openemr/library/ADODB_mysqli_log.php on line 188

mysqli_real_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/openemr/library/ADODB_mysqli_log.php on line 188

from openemr library/sql.inc - Unable to set up UTF8 encoding with mysql database: php_network_getaddresses: getaddrinfo failed: Name or service not known

Unable to set strict sql setting: php_network_getaddresses: getaddrinfo failed: Name or service not known

Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /var/www/openemr/vendor/adodb/adodb-php/adodb.inc.php on line 182

So you are having issues with your connection to mysql.

The last message though is a critical error. I think though your blank screen starts with the mysql connection problem, though.
Does your info.php page tell you that you have the mysqli connector?
You should have the odbc connector too if I am not mistaken, depending on your version of PHP. I believe 7.4 already includes it.

@brady.miller Hi brady, where do I go from here?

hi @rdh61, does

mysql -u openemr --password=MyPreviousPasswordBeforeRestore

work?

Thanks for your reply.

robert@robert-ideacentre-AIO-520-22IKU:~$ mysql -u openemr --password=MyPreviousPasswordBeforeRestore
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'openemr'@'localhost' (using password: YES)
robert@robert-ideacentre-AIO-520-22IKU:~$ sudo  mysql -u openemr --password=MyPreviousPasswordBeforeRestore
[sudo] password for robert:       
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'openemr'@'localhost' (using password: YES)
robert@robert-ideacentre-AIO-520-22IKU:~$

@stephenwaite

But mysql -u openemr --password=openemr works:

robert@robert-ideacentre-AIO-520-22IKU:~$ mysql -u openemr --password=openemr
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.29-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

ok, would use this password in the sqlconf.php then and would also change mysql to localhost.

2 Likes

Bingo! So, to get this thing to work I have to:

  1. sudo chown -R www-data:www-data /var/www/openemr
  2. Change host to ‘localhost’. (Password is already set to ‘openemr’.)

Thank you!

2 Likes