I've been working on a website for awhile now and everything works perfectly fine on my WAMP environment. Lately, I uploaded it to the production server to discover that nothing works. Ha. Just my luck!
So it would seem through looking into the markup to figure out what's up that there's an apparent header issue. Below is the following "Warning" message that I found:
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /export/home/account/public_html/user/some_folder/themes/isu_english/header.php:6) in <b>/export/home/user/public_html/some_folder/login.php</b> on line <b>341</b><br />
Knowing what little I know about this right now, it would seem that some changes I made to the login.php file has caused a bit of a rift with the way some redirects are being used. That's okay because I think I can fix it but it leads me to be curious about my development environment in contrast to the production environment.
My basic question here is about this header issue: what would cause something like this to work perfectly fine in my development environment and break on the production environment? Something with a PHP directive? The versions of Apache and PHP are the same. I didn't check the MySQL because in my mind, this doesn't relate to that. I might be wrong, though...
Any ideas would be appreciated. This has me stumped.
Presumably the // EOF informs everyone that that is actually the end and no lines have been accidentally lost.
The message means something is being output to the web page prior to the headers.
This can be something like a byte order mark added to the front of files, a space before the <?php at the start of any file, or even a prior error message relating to an error earlier in the file.
Also, ZenCart is now advertising a "fix" to the spaces after a ?> in an included file:
few - BOM Removal - tricks:
1. "edit /77 <yourfile.php>" and delete first illegal characters.
2. Open the file in notepad and save it as ascii text.
Make sure that header.php does not echo/print anything.
In general do not output anything before setting up cookies, calling sesion_start(), header(), ...
in worst case (when there are several files to edit for this fix and you want a quick fix for a debug only purpose, remove Byte Order Mark in header.php and put the first PHP code as: