php – Suddenly sessions and header location not working

Question

we have got a wordpress website which we use with external php scripts which use sessions and which are included via wordpress plugins in wordpress pages. This has been working fine over the course of the last 10 years.
However, suddenly today this has stopped working. When I open a wordpress page with such an included php file, I get the error message that session_start() is not working because headers have already been sent.
This is something I do not understand because yesterday it worked.
As header(“Location: …”) won’t work either it seems to me that somehow there ia an output from wordpress which blocks the session in our external programs.
Yesterday wordpress updated to 6.0.2 so I suspected the update but have already downgraded to 6.0.1 and 6.0 which did not solve the issue. In addition a second wordpress site on 6.0.2 has no problem with the sessions in external phps.

I then deactivated all the plugins but the problem is still there. I also changed the theme to twenty-twentytwo but still no luck. If you open the included external php scripts directly without including them in wordpress, they work as expected.

I am clueless. There must be a reason why it stopped working. Do you have any ideas what I can do?

0
MrHjS 4 weeks 2022-08-31T13:45:47-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse