session-start – headers already sent

This happens when you try to start session more than once.

The solution for above problem is

1) in php.ini file set session.autostart to 0

session.auto_start = 0

2) Placing a .htaccess file in the root of your web directory with the following value:

php_flag session.auto_start 0

3) In your code use this line

if (!session_id()) session_start();

instead of


Permanent link to this article:

Leave a Reply

Your email address will not be published.