Unable to login after new install

Or, if not, can look at it directly from database (comments field).

Hi, I couldn’t find a comments field in users_secure. Is this field present in another table, perhaps?

In the meantime, I’ve found a table called logs, and it also has a comments field. So I’ve attached the table here in PDF format. Are these the right log entries?

sql.pdf (93.2 KB)

How do I restore/re-install the globals table? Would you please walk me through the process?

I did go through the global table, and I found a record gbl_minimum_password_length with the value 9. Shall I set it to 4 and see if it solves the problem?

Showing rows 0 - 0 (1 total, Query took 0.0007 seconds.)

SELECT * FROM `users_secure` WHERE 1;

1	emr-administrator	$2a$05$MKtnxYsfFPlb2mOW7Qzq2Oz61S26s5E80Yd60lKdX4W...	2021-12-01 13:34:54	2021-12-12 07:19:23	
    NULL
	
    NULL
	
    NULL
	
    NULL
	
    NULL
	
    NULL
	0

I think I should also mention this, just in case. The Login screen shows the red box saying “Invalid username or password” right when the page loads, before I even have a chance to enter anything. :slight_smile:

Copy/paste the comments field from the last row in above log table pdf into a base64 decoder to see what it is saying: https://www.base64decode.org/

Thanks for the help, Brady. This is the message I get, when I convert the comment of the latest record:

failure: ::1. user not in any phpGACL groups

hi @magnetar47 , try the solution here: Can't login with initial user - #9 by brady.miller

I executed this query, restarted Apache, and tried logging in, but no luck still. FYI, the query executed successfully, and here’s the table after inserting the new record:

gacl_groups_aro_map.csv (32 Bytes)

Here’s the comment from the latest log entry corresponding to today’s login attempt:

failure: ::1. user not in any phpGACL groups

It’s showing the same error message. I’ve double-checked that this is indeed from the log-entry corresponding to my login attempt after following @brady.miller’s suggestion.

Let me know if I should try something else. The ball is in your court now. :wink:

hi @magnetar47 , would reinstall since only that 1 entry in gacl_groups_aro_map could cause other issues down the road.

Alright, I’ll do that. Any idea as to why it didn’t install properly the first time? Should I especially watch out for something, when I reinstall OpenEMR?

By the way, do I just re-run setup.php to reinstall OpenEMR again, or is there some uninstallation process to do before that?

Disregard my comment. I was looking at the demo install with additional users and groups.

Just need to add an entry to gacl_aro as well I believe.

INSERT INTO `gacl_aro`(`id`, `section_value`, `value`, `order_value`, `name`, `hidden`) VALUES ('10','users','admin','10','Adminstrator','0')

Right. Good thing I checked back before starting the uninstallation, haha.

So that query executed successfully, but now when I go to localhost/openemr, I’m faced with this error message:

Warning: mysqli_real_connect(): (HY000/1044): Access denied for user 'openemr'@'localhost' to database 'openemr' in D:\xampp\htdocs\openemr\library\ADODB_mysqli_log.php on line 191

Fatal error: Uncaught TypeError: mysqli_query(): Argument #1 ($mysql) must be of type mysqli, bool given in D:\xampp\htdocs\openemr\vendor\adodb\adodb-php\drivers\adodb-mysqli.inc.php:788 Stack trace: #0 D:\xampp\htdocs\openemr\vendor\adodb\adodb-php\drivers\adodb-mysqli.inc.php(788): mysqli_query(false, 'SET NAMES 'utf8...', 0) #1 D:\xampp\htdocs\openemr\vendor\adodb\adodb-php\adodb.inc.php(1263): ADODB_mysqli->_query('SET NAMES 'utf8...', false) #2 D:\xampp\htdocs\openemr\vendor\adodb\adodb-php\adodb.inc.php(1241): ADOConnection->_Execute('SET NAMES 'utf8...', false) #3 D:\xampp\htdocs\openemr\library\ADODB_mysqli_log.php(60): ADOConnection->Execute('SET NAMES 'utf8...', false) #4 D:\xampp\htdocs\openemr\library\sql.inc(53): ADODB_mysqli_log->ExecuteNoLog('SET NAMES 'utf8...') #5 D:\xampp\htdocs\openemr\interface\globals.php(268): require_once('D:\\xampp\\htdocs...') #6 D:\xampp\htdocs\openemr\interface\login\login.php(28): require_once('D:\\xampp\\htdocs...') #7 {main} thrown in D:\xampp\htdocs\openemr\vendor\adodb\adodb-php\drivers\adodb-mysqli.inc.php on line 788

I’m pretty sure I didn’t modify anything yesterday that could cause this, so I don’t understand what’s going on. I tried after restarting Apache, but no luck. Is this error related to this current topic, or should I open a new topic for this issue?

What PHP version are you using?

PHP 8.0.13 (cli) (built: Nov 16 2021 21:58:37) ( ZTS Visual C++ 2019 x64 )
Copyright (c) The PHP Group
Zend Engine v4.0.13, Copyright (c) Zend Technologies

Helooo…?? :slight_smile:

Should I try something else, or just go for a re-install? Also, any idea why I wasn’t able to login in the first place? Is it a bug, or just a freak accident from my side? I want to make sure I haven’t messed up anything during install, and if I did, avoid doing that next time.

@magnetar47 ,
Rec. trying a full reinstall. Also, on your next post, let us know if using mariadb or mysql and which version.

Alright, I’ll reinstall. I’m using MariaDB bundled with XAMPP:

Server version: 10.4.22-MariaDB mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Uh… how do I reinstall OpenEMR though? Shall I just re-run the installer? Or should I delete OpenEMR in Apache/htdocs and re-extract?

hi @magnetar47 , easy to find some guidance online. Maybe you’d be interested in running the openemr docker on windows 11?

Before doing reinstall if not too late, try running sql_upgrade.php from browser.(as if doing normal upgrade)
Sometimes on install the GACL will error and running update will fix…

1 Like

That article details the reinstallation process of XAMPP, and not OpenEMR. I have no idea about web servers and/or deployment, but wouldn’t it suffice to just re-install OpenEMR?

I’ll look into the idea. I’m just trying to explore the feasibility of self-hosting an EMR solution. Do you personally suggest using Docker for hosting OpenEMR? Do you think I’d be able to manage OpenEMR administration easier with Docker?

The error I pointed out in this comment is preventing me from running sql_upgrade.php at the moment.

Warning: mysqli_real_connect(): (HY000/1044): Access denied for user 'openemr'@'localhost' to database 'openemr' in D:\xampp\htdocs\openemr\library\ADODB_mysqli_log.php on line 191

Fatal error: Uncaught TypeError: mysqli_query(): Argument #1 ($mysql) must be of type mysqli, bool given in D:\xampp\htdocs\openemr\vendor\adodb\adodb-php\drivers\adodb-mysqli.inc.php:788 Stack trace: #0 D:\xampp\htdocs\openemr\vendor\adodb\adodb-php\drivers\adodb-mysqli.inc.php(788): mysqli_query(false, 'SET NAMES 'utf8...', 0) #1 D:\xampp\htdocs\openemr\vendor\adodb\adodb-php\adodb.inc.php(1263): ADODB_mysqli->_query('SET NAMES 'utf8...', false) #2 D:\xampp\htdocs\openemr\vendor\adodb\adodb-php\adodb.inc.php(1241): ADOConnection->_Execute('SET NAMES 'utf8...', false) #3 D:\xampp\htdocs\openemr\library\ADODB_mysqli_log.php(60): ADOConnection->Execute('SET NAMES 'utf8...', false) #4 D:\xampp\htdocs\openemr\library\sql.inc(53): ADODB_mysqli_log->ExecuteNoLog('SET NAMES 'utf8...') #5 D:\xampp\htdocs\openemr\interface\globals.php(268): require_once('D:\\xampp\\htdocs...') #6 D:\xampp\htdocs\openemr\sql_upgrade.php(44): require_once('D:\\xampp\\htdocs...') #7 {main} thrown in D:\xampp\htdocs\openemr\vendor\adodb\adodb-php\drivers\adodb-mysqli.inc.php on line 788

I’ll just proceed with the reinstallation, I suppose. :frowning:

hi @magnetar47, would reinstall xampp and openemr. Xampp is prob easier to get up and going than docker but not so far :slight_smile:

Sorry, don’t mean to intervene however, xampp can be a pain to reinstall so I wouldn’t.
Just reinstall openemr by first overwriting your htdoc openemr folder with download. Also be aware of setting up on a drive other than c: and ensure all your environment variables are set up. Should be if xampp was installed correctly.

2 Likes