Fatal error: HTTP headers are on / path / line / Includes / on.php on line 678. Please note that it can’t be set. See header () function documentation for details in /path/to/includes/classes/JsHttpRequest.php on line 89

When I click "place an order" on the site such an error appears. Previously, everything was fine, the error occurred after the transfer to another hosting. What to do?

  • one
    not deprecated function? - Vfvtnjd
  • No, it is written - fatal error, what have deprecated? - AntonioK

2 answers 2

The previous answer, of course, is complete nonsense - because, firstly, it narrows down all the causes of this error to the only one known to the author, and secondly, it does not fit into the description of the problem that arose when transferring the same files to another hosting.

Therefore, the correct solution is to rewrite spaghetti govnokod when some text is sent to the browser first, then the HTTP header, and then it turns out that you don’t need to display anything and redirect it.

In particular, in this particular case, you need to make sure that the top.php file is not connected every time you access the site, but only when you need to display a page in the site design.

However, I have not yet met a single poacher, who would have followed the above advice. All of them are so incredible works worth scribbling the functionality of the "place an order" button, that the very idea of ​​rewriting the code and making it better, terrifies them.

Therefore, the only acceptable solution for them is they see only the adjustment of the settings of the new hosting service in accordance with the settings of the old one - so that the new one also forgives the curvature of the code. This is done either in the PHP settings, by setting the output_buffering = on setting, or simply by cramming the magic word ob_start() at the very top of the problem script. Although when I see this second option, then bloody tears flow from my eyes. Since the use of the tool for other purposes was described by the still great Mark Twain, but over unlucky Tom Kent, who was killing nuts with the royal seal, the whole enlightened Europe had been laughing for a hundred years.

    Painfully familiar =) Come on a hosting, open this file in which the given error jumps out ( top.php or something another). And delete the left characters at the very beginning of the file (spaces, quotes, etc.). Then click "save as ..." and uncheck "with BOM".

    Those. You must save this file without a BOM signature. Because of her, such errors also pop up.