Problem logging in using Cakephp on session_regenerate_id()

Asked

Viewed 240 times

0

Testing at home, my Cakephp project works perfectly. But when running the same project on the site, with the appropriate changes, as expected it presents a slightly different behavior.

But a problem is really bothering me when trying to log in:

Warning (2): Cannot modify header information - headers already sent by
(output started at /local/local/local/site/app/Model/User.php:54)        
[CORE/Cake/Model/Datasource/CakeSession.php, line 686]
Warning (2): session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate s           
session id - headers already sent [CORE/Cake/Model/Datasource/CakeSession.php, line 688]

1 answer

3


Your code is doing some data output before sending or modifying the headers. If you take a look in this article of stackoverflow they explain very well.

Next time you need help, put the code snippet where you think the error is being generated that is easier for those who answer.

  • put a space after the <?php ? > tag in the model used , and the model used was accessed before changing the items, thank you

Browser other questions tagged

You are not signed in. Login or sign up in order to post.