Errors after new install of Version 6

I installed openemr for the first time and I am receiving error messages after I log in. In the upper left I get a message
Only variables should be passed by reference in
D:\xampp\htdocs\openr\src\Menu\MainMenuRole.php
on line
68

Then in the calendar I see several messages (only the first is fully visible. the others are behind the calendar)
Warning:L undefined array key “pc_username” in D:\xampp\htdocs\openemr\interface\main\Calendar\modules\PostCalendar\pnuser.php on line 71
???\pnuserapi.php on line 100
???\common.api.php on line 227
???\pnuserapi.api on line 828

OpenEMR Version
I’m using OpenEMR version

I’m using: Chrome

I’m using: Windows 10

I see pretty much the same errors in the apache error log and no errors in the other logs.

[Thu Jan 28 11:40:32.783162 2021] [php:notice] [pid 13032:tid 1796] [client ::1:49995] PHP Notice:  Only variables should be passed by reference in D:\\xampp\\htdocs\\openemr\\src\\Menu\\MainMenuRole.php on line 68, referer: http://localhost/openemr/interface/login/login.php?site=default
[Thu Jan 28 11:40:36.975278 2021] [php:warn] [pid 13032:tid 1808] [client ::1:50001] PHP Warning:  Undefined array key "pc_username" in D:\\xampp\\htdocs\\openemr\\interface\\main\\calendar\\modules\\PostCalendar\\pnuser.php on line 71, referer: http://localhost/openemr/interface/main/tabs/main.php?token_main=39vVREFzcf7Uk1Ikz7zk7svHYTtnaI8lPwZaoJP1
[Thu Jan 28 11:40:36.975278 2021] [php:warn] [pid 13032:tid 1808] [client ::1:50001] PHP Warning:  Undefined array key "pc_username" in D:\\xampp\\htdocs\\openemr\\interface\\main\\calendar\\modules\\PostCalendar\\pnuserapi.php on line 100, referer: http://localhost/openemr/interface/main/tabs/main.php?token_main=39vVREFzcf7Uk1Ikz7zk7svHYTtnaI8lPwZaoJP1
[Thu Jan 28 11:40:36.976278 2021] [php:notice] [pid 13032:tid 1808] [client ::1:50001] 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: http://localhost/openemr/interface/main/tabs/main.php?token_main=39vVREFzcf7Uk1Ikz7zk7svHYTtnaI8lPwZaoJP1
[Thu Jan 28 11:40:36.977276 2021] [php:warn] [pid 13032:tid 1808] [client ::1:50001] PHP Warning:  Undefined array key "pc_username" in D:\\xampp\\htdocs\\openemr\\interface\\main\\calendar\\modules\\PostCalendar\\pnuserapi.php on line 828, referer: http://localhost/openemr/interface/main/tabs/main.php?token_main=39vVREFzcf7Uk1Ikz7zk7svHYTtnaI8lPwZaoJP1
[Thu Jan 28 11:44:28.928125 2021] [php:warn] [pid 13032:tid 1824] [client ::1:50022] PHP Warning:  Undefined array key "pc_username" in D:\\xampp\\htdocs\\openemr\\interface\\main\\calendar\\modules\\PostCalendar\\pnuser.php on line 71, referer: http://localhost/openemr/interface/main/tabs/main.php?token_main=39vVREFzcf7Uk1Ikz7zk7svHYTtnaI8lPwZaoJP1
[Thu Jan 28 11:44:28.928125 2021] [php:warn] [pid 13032:tid 1824] [client ::1:50022] PHP Warning:  Undefined array key "pc_username" in D:\\xampp\\htdocs\\openemr\\interface\\main\\calendar\\modules\\PostCalendar\\pnuserapi.php on line 100, referer: http://localhost/openemr/interface/main/tabs/main.php?token_main=39vVREFzcf7Uk1Ikz7zk7svHYTtnaI8lPwZaoJP1
[Thu Jan 28 11:44:28.930123 2021] [php:notice] [pid 13032:tid 1824] [client ::1:50022] 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: http://localhost/openemr/interface/main/tabs/main.php?token_main=39vVREFzcf7Uk1Ikz7zk7svHYTtnaI8lPwZaoJP1
[Thu Jan 28 11:44:28.931123 2021] [php:warn] [pid 13032:tid 1824] [client ::1:50022] PHP Warning:  Undefined array key "pc_username" in D:\\xampp\\htdocs\\openemr\\interface\\main\\calendar\\modules\\PostCalendar\\pnuserapi.php on line 828, referer: http://localhost/openemr/interface/main/tabs/main.php?token_main=39vVREFzcf7Uk1Ikz7zk7svHYTtnaI8lPwZaoJP1
[Thu Jan 28 11:44:32.639751 2021] [php:warn] [pid 13032:tid 1824] [client ::1:50022] PHP Warning:  Undefined array key "pc_username" in D:\\xampp\\htdocs\\openemr\\interface\\main\\calendar\\modules\\PostCalendar\\pnuser.php on line 71, referer: http://localhost/openemr/interface/main/calendar/index.php?module=PostCalendar&func=view&viewtype=day
[Thu Jan 28 11:44:32.640753 2021] [php:warn] [pid 13032:tid 1824] [client ::1:50022] PHP Warning:  Undefined array key "pc_username" in D:\\xampp\\htdocs\\openemr\\interface\\main\\calendar\\modules\\PostCalendar\\pnuserapi.php on line 100, referer: http://localhost/openemr/interface/main/calendar/index.php?module=PostCalendar&func=view&viewtype=day
[Thu Jan 28 11:44:32.641753 2021] [php:notice] [pid 13032:tid 1824] [client ::1:50022] 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: http://localhost/openemr/interface/main/calendar/index.php?module=PostCalendar&func=view&viewtype=day
[Thu Jan 28 11:44:32.642410 2021] [php:warn] [pid 13032:tid 1824] [client ::1:50022] PHP Warning:  Undefined array key "pc_username" in D:\\xampp\\htdocs\\openemr\\interface\\main\\calendar\\modules\\PostCalendar\\pnuserapi.php on line 828, referer: http://localhost/openemr/interface/main/calendar/index.php?module=PostCalendar&func=view&viewtype=day
[Thu Jan 28 13:44:37.283308 2021] [php:warn] [pid 13032:tid 1824] [client ::1:50507] PHP Warning:  session_destroy(): Trying to destroy uninitialized session in D:\\xampp\\htdocs\\openemr\\src\\Common\\Session\\SessionUtil.php on line 215, referer: http://localhost/openemr/interface/main/tabs/main.php?token_main=39vVREFzcf7Uk1Ikz7zk7svHYTtnaI8lPwZaoJP1
[Thu Jan 28 13:44:37.377055 2021] [php:warn] [pid 13032:tid 1816] [client ::1:50508] PHP Warning:  session_destroy(): Trying to destroy uninitialized session in D:\\xampp\\htdocs\\openemr\\src\\Common\\Session\\SessionUtil.php on line 215, referer: http://localhost/openemr/interface/main/tabs/main.php?token_main=39vVREFzcf7Uk1Ikz7zk7svHYTtnaI8lPwZaoJP1

hi @dgiedd, check out the best php settings for OpenEMR.

1 Like

I made adjustments to the php.ini file as suggested, restarted apache and the errors have gone away. Thanks for your help.

1 Like