2
When migrating a codeigniter application from localhost to the server the following error appears to me
A PHP Error was encountered Severity: Warning Message: session_start(): Cannot send Session cookie - headers already sent by (output Started at /home/bassgrou/public_html/centro_eventos/application/config/mimes.php:1) Filename: Session/Session.php Line Number: 140
Backtrace:
File: /home/bassgrou/public_html/centro_eventos/application/controllers/Cliente_controller.php Line: 7 Function: __Construct
File: /home/bassgrou/public_html/centro_eventos/index.php Line: 292 Function: require_once
Normally I have never used session_start() to start aglum thing in CI, you are using?
– Sr. André Baill
I have autoload from the library 'Session'
– Laranja Mecânica
Use
session_start();
preferably as your file’s first function, and never after you have printed or display HTML content.– Ivan Ferrer
Solved, it was a blank space before the <?php tag opened in the mime.php file
– Laranja Mecânica
Good afternoon, do not put answers within the question, we are not a forum or anything like that, we are a Q&A, read the tour: http://answall.com/tour. your question was duplicated because in the other answers of the other question you already have the solution to your problem. I’m sure you’ll take this as a constructive criticism.
– Guilherme Nascimento