Fix: Warning: session_start(): Cannot send session cookie

Fix: Warning: session_start(): Cannot send session cookie
If you recently migrated a Joomla website that uses session handling for modules, components, or plugins, you might want to check your index.php for blank space at the top and bottoms of the files and delete it! It seems this file may have gotten inserted whitespace during an akeeba backup. You might be receiving the following error(s) if that’s the case:
 
 




Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home1/public_html/index.php:2) in /home1/website/public_html/libraries/joomla/session/session.php on line 537

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home1/public_html/index.php:2) in /home1/website/public_html/libraries/joomla/session/session.php on line 537

 
 
Open your index.php file -> your site -> index.php. Now, review the file and ensure no white space exists at top or bottom of file. See example picture below of white space revealed at top of file.
 
Warning: session_start(): Cannot send session cookie
 
After the white space is removed and your index.php is saved again (ANSI format), you should have session handling back to normal and no more errors above.
 
 
* Please use the comment form below. Comments are moderated.*



Related Posts

 

Comments

No comments made yet. Be the first to submit a comment
Saturday, 21 December 2024