-1

I have checked lots of posts to try to know why header() doesn't worked when I uploaded my project to my hosting, because it was working when I was checking it on localhost.

Include error_reporting(E_ALL); in some part of your php code for see all errors.

Then I saw a error appeared: Warning: "Cannot modify header information - headers already sent by (output started at /homepages/6/d906792626/htdocs/app/Model.php:388) in /homepages/6/d906792626/htdocs/app/Controller.php on line 63"

Then the last thing I did was creating php.ini and writting this line: output_buffering = On

Then it started working.

PD: I have considered to do this post because I have been 4 hours trying to figure out what was going bad.

  • Look at `/homepages/6/d906792626/htdocs/app/Model.php:388`, what does it contain? Something is sending data to the browser before it's supposed to – aynber May 19 '22 at 15:46
  • 1
    Please don't post questions that contain answers. You're expected to provide an answer **as an answer**, not as part of the question. – user229044 May 19 '22 at 15:49

0 Answers0