0

I am getting those errors for my CakePHP application

Warning (2): Cannot modify header information - headers already sent by (output started at /myapp/vendor/cakephp/cakephp/src/basics.php:93) [CORE/src/Network/Session.php, line 573]
Warning (2): session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent [CORE/src/Network/Session.php, line 576]

The problem is that they appear only if I try to access my webpage from a mobile. Any ideas how can I solve that issue ?

radioaktiv
  • 2,437
  • 4
  • 27
  • 36
  • This occurs when there are whitespaces or error messages before redirecting. Please check for these. – Jan Oct 14 '15 at 07:57
  • 4
    OR just read the error message **output started at /myapp/vendor/cakephp/cakephp/src/basics.php:93**. You are calling [debug](https://github.com/cakephp/cakephp/blob/master/src/basics.php#L93) before the session is started. You are shooting yourself in the foot =). – AD7six Oct 14 '15 at 08:05
  • Yes but how do I get that messages when I access the webpage only from a mobile phone ? As I mentioned It just works fine from normal browsers on PC like Chrome or Firefox. – radioaktiv Oct 14 '15 at 08:10
  • 1
    @Finn because you're calling debug, somewhere, only for mobile requests. Obvious solution: Find the call to debug and remove it. – AD7six Oct 14 '15 at 08:53

0 Answers0