The session id in php on the hosting is constantly changing

Wrote an authorization script. I uploaded it to my home computer – it works. Uploaded to hosting – does not work. I found that on hosting, when updating a page and moving from one to another, the session id is constantly changing. This does not happen on a home computer.
Home computer
Website hosted
Page sources are available on your home computer at the links:
Login to check temoffey, password 123456.
Please help me figure out what is the reason for this behavior.
Thanks in advance.

Answer 1, authority 100%

session_start() on

To use cookie-based sessions, session_start() must be called before outputing anything to the browser.

This function must be called before any output.

It’s not “different” for you, it just won’t install.

// code, code, code...

You may have forced caching with a large buffer enabled on your home computer, but not on your hosting.

Leave a reply

Please enter your comment!
Please enter your name here