Openemr and PHP

I’m having issues getting openemr to work. From the relevant Apache error logs, if I use the xampp version downloaded from openemr (5.6.20) I get “PHP Parse error: syntax error, unexpected ‘?’ in C:\xampp\htdocs\openemr\index.php on line 12”

If I use the latest xampp version (8.2.12) I get “PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in C:\xampp\htdocs\openemr\interface\login\login.php on line 188”

Now, I don’t want to go making changes that then only cascades the problems, so I’m really hoping there’s a simple fix for all this! I have reloaded xampp (both versions) and openemr several times.

OpenEMR Version
I’m using OpenEMR version 7.0.2

I’m using: Firefox

Operating System
I’m using: Windows 10 64 bit

Did you search the forum for similar questions? My eyesight has started to fade from reading the forum looking for a solution that will work!

Did you check the logs? Yes, entries as shown above.
Was there anything pertinent in them? As above!!

If I understand you correctly you are using OpenEMR 501? That is an outdated version and you should be using the most recent version, OpenEMR 702. If you are intent on using 501, you need to use an older PHP library, PHP7.4 is the best choice.

It is recommended to use the latest version of OpenEMR with the latest version of PHP.

No, as indicated OpenEMR 7.0.2. Have tried it with Xampp 8.2.12 which is PHP 8, gives the Fatal Error shown in my post. Xampp 5.6.20 gives the Parse error shown in my post. Therein lies the dilemma…

No, using OpenEMR 7.0.2, which won’t work with latest PHP anyway.

Try updating node modules and re-installing. openemr/sites directory to be writable & php required extensions are loaded.

Do you know if you are using the most recent patch? Or are you running from master?