***The line you see here is the very first line of this very simple index.php file. NO PHP CODE HAS EXECUTED YET.***
The error you see above this line ^^^ is NOT a developer coding error. It is a hosting error. If you are not seeing it, just refresh a few times.
This page is running a simple PRINT statement.
Refresh the screen repeatedly and you will see an error approximately 50% of the time.
Please refresh many times and you will see
the IONOS hosting problem where PHP server's user account does not have permission to delete TMP files.
There is nothing else running here, you cannot blame the code for this issue.
STOP BLAMING THE CODE FOR THIS ERROR. IT IS YOUR PHP8 HOSTING.
THE PROBLEM IS WITH THE PHP8 GARBAGE COLLECTION ON IONOS HOSTING.
IF YOU CHANGE THE CG_PROBABILITY IN THE PHP.INI file TO 100 YOU WILL SEE THIS ERROR EVERY PAGE LOAD.
IF YOU CHANGE IT TO ZERO IT WILL STOP HAPPENING COMPLETELY.
IT IS CURRENTY SET TO 50 SO IT HAPPENS APPROXIMATELY 50% RANDOMLY.
===========================================================================================================
THE FIX IS TO ALLOW YOUR SHARED HOSTING USER ACCOUNT TO DELETE FILES IN THE /TMP ROOT FOLDER.
===========================================================================================================
HOW MUCH MORE HELP DO YOU NEED TO CORRECTLY IDENTIFY THE PROBLEM WITH YOUR HOSTING??? I HAVE GIVEN YOU THE ANSWER!!!
THESE ERRORS CAUSE USER SESSIONS TO CRASH
THEY ALSO CREATE SECURITY GAPS IN YOUR USER'S SITES.
STOP BLAMING THE CODE AND FIX IT
Temp folder is: /tmp