Errors, including get_magic_quotes.php file into main controller

It sound weird and I’ve tried it many times, but I’m getting Error message when include (not while keep the code at the top of main controller’s text) ‘get_magic_quotes.php’ into controller. It says: “Warning: Cannot modify header information - headers already sent by (output started at C:\xampplite\htdocs\chapter5\get_magic_quotes.php:1) in C:\xampplite\htdocs\chapter5\index.php on line 28”.(attaching the archive with set of php files, there’s some russian text too https://yadi.sk/d/RD3IJGJRi7jbo)). It occurs every time I try to POST or DELETE joketext. I can’t get the point, please wise folks give me the clue

looks like a BOM (Byte Order Mark) issue …

1 Like

You have a space before <?php

make sure there is no whitespace before <?php because if there is, you have already sent your header.

<?php should be the very first thing in your file.

Oh, I’ve fixed one - fine, but here’s yet another identical problem (header (‘Location: .’) although this time no spaces left. I even cleared the cache (using XAMMPP lite, PSPad editor with utf-8 encoding).
I’ve got spaces after “<?php” (for nice readability purposes) and none before

these errors usually point you to the location where the output started.

It should have, output started at line xx, my guess is line 1
What script sent the output and what line?

I have had what appears to be no whitespace before the php tags.
I just backspaced over the php tags to the beginning of the file and re typed the php tags, worked.

As Dormilich mentioned in post #2, an important thing here is to save the file without a BOM

Finally, it works! The only thing was encoding utf-8 without BOM necessary for all files included, thanx guys

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.