Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
The session must be started before printing any text.
This is what the warning text is about - headers alredy send.
When a session starts, the server sends a cookie with the session ID to the client. Cookies are passed in headers. Headers can only be sent before the response body is sent. Any echo starts sending the response body, and headers can no longer be sent.
Well, the very first varning is an outdated way of designating a constructor. People, wake up, php 5 has been released for ten years already! You must use __construct()
Bad advice, but try an older version of PHP, it won't get deprecated, and therefore no other errors.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question