Back up error on a new client installation

php error log
[Mon Aug 23 15:06:09.598997 2021] [php7:notice] [pid 1904:tid 1836] [client XXXXX] PHP Notice: Only variable references should be returned by reference in D:\xampp\htdocs\openemr\interface\main\calendar\modules\PostCalendar\common.api.php on line 227, referer: XXXXXXX/openemr/interface/main/tabs/main.php?token_main=XXXXXXXXXXX
mysqldump: Got error: 1045: “Access denied for user ‘openemr’@‘localhost’ (using password: YES)” when trying to connect

mysql error log
2021-08-23 15:06:22 19 [Warning] Access denied for user ‘openemr’@‘localhost’ (using password: YES)

Win 10
Chrome
Xampp v 7.3

You must configure the username and password in your new database. You should leave it as is in openmr/sites/default/sqlconf.php.
Regards.
Luis.

1 Like

can u kindly walk me through ?

In phpmyadmin or heidisql, in the sql command box, you must run the following:

CREATE USER ‘openemr’@‘localhost’ IDENTIFIED BY ‘YourPassword’;
GRANT ALL PRIVILEGES ON openemr.* TO ‘openemr’@‘localhost’;
FLUSH PRIVILEGES;

Then in your config file:
openemr/sites/default/sqlconf.php

It should be as follows:
$host = ‘localhost’;
$port = ‘3306’;
$login = ‘openemr’;
$pass = ‘YourPassword’;
$dbase = ‘openemr’;
$db_encoding = ‘utf8’;

Assuming your system database is called openemr

Regards.
Luis.

1 Like

regarding the second part of your reply, i have
$db_encoding = ‘utf8mb4’;

Leave it like that, just keep in mind username, database and password

1 Like

username, database and password are fine

regarding running the commands do i write it after choosing openemr database in phpmyadmin?

i exported the sql database and then backed the openemr database then did a fresh install of xampp and then restored everything in place using same root password and login credentials and got server up and running but still shows same error.

username and password in mysql must be for root@localhost. There are others like root @%

1 Like

changed the password for localhost as well

Just an update after banging my head against the wall for a couple of days.

So i installed latest Xampp and openemr 6.0 on windows sandbox and just after installing everything works fine (as it should !!), even restoring the backup (i wouldn’t call it a proper backup though) that was made on another machine and database works flawlessly.

There is something wrong with windows and i can’t figure it out. I removed Xampp completely and removed every leftover and every time i re-install i get to the same point, the emr works but the backup option wont run. I guess the only left option is to re-install windows which is …

There have been issues with windows backup command parsing off and on in the past, even v6. Be sure to install latest patch.
Still, i’d find a better way to backup and restore.

1 Like

I now have 2 problems one is to find why on earth my install gets bricked on clean installs (only backup option only in Administration>Backup is not working) so i can avoid in the future, the second of which is to kinda have a health check of the system functions to know if your good or something is looming in the dark waiting to happen.

Yeah its easy for pros to do a backup, but for novices like myself i only take a disk image (installed xampp on a dedicated drive) and a database export sql file from phpmyadmin. Don’t laugh at me i am not using scripts or command lines wizard stuff !

1 Like

So …

Running backups still wont work after windows reset and Xampp reinstallation. Again if anyone can figure out what’s going on here

PHP error log:
[php:warn] [pid 11620:tid 1844] [client ::1:53458] PHP Warning: Array to string conversion in D:\xampp\htdocs\openemr\custom\code_types.inc.php on line 78, referer: http://XXXXX/openemr/interface/main/backup.php
[php:warn] [pid 11620:tid 1844] [client ::1:53458] PHP Warning: Array to string conversion in D:\xampp\htdocs\openemr\custom\code_types.inc.php on line 78, referer: http://XXXXX/openemr/interface/main/backup.php
[php:warn] [pid 11620:tid 1844] [client ::1:53458] PHP Warning: Array to string conversion in D:\xampp\htdocs\openemr\custom\code_types.inc.php on line 78, referer: http://XXXXX/openemr/interface/main/backup.php
The system cannot find the path specified.

OpenEMR Diagnostics:

Name Value
CMS Version 0.7.2.6-Phoenix
Sitename
url /openemr/interface/main/calendar/
PHP Version 8.0.9
PHP safe_mode Off
PHP safe_mode_gid Off
PHP open_basedir NULL
SAPI apache2handler
OS Windows NT DESKTOP-6OJFK0L 10.0 build 19043 (Windows 10) AMD64
WebServer Apache/2.4.48 (Win64) OpenSSL/1.1.1k PHP/8.0.9
Module dir modules/PostCalendar
Module version 4.0.0
smarty version 2.6.31
smarty location D:\xampp\htdocs\openemr\vendor\smarty\smarty\libs\
smarty template dir modules/PostCalendar/pntemplates
smarty compile dir D:/xampp/htdocs/openemr/sites/default/documents/smarty/main

Have you installed patch 2? if not, install. There’s a fix for windows backup in the patch.
If that’s not the problem then ?

1 Like

Need more info on what happens when you run backup?

1 Like

tell me what do i need to provide