Mike Lewis
Programmer
I have the following line of code in a script:
This works correctly when I run the script in my development environment. But on the production server, it fails with a message saying that headers have already been sent.
I understand that this function must be executed before any output of any kind has been sent. I've taken care not to send any headers or text of any kind, not even a blank line, before calling the function. Besides, if that wasn't the case, I'd expect it to fail in both environments.
Can anyone tell me why the behaviour should be different on the two systems. The production server is running PHP 5.2.5, and the development system is 5.2.8, but I can't see anything in the change log that would affect this.
Thanks in advance.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro tips, advice, training, consultancy
Custom software for your business
Code:
header('Location: maint_1.php');
This works correctly when I run the script in my development environment. But on the production server, it fails with a message saying that headers have already been sent.
I understand that this function must be executed before any output of any kind has been sent. I've taken care not to send any headers or text of any kind, not even a blank line, before calling the function. Besides, if that wasn't the case, I'd expect it to fail in both environments.
Can anyone tell me why the behaviour should be different on the two systems. The production server is running PHP 5.2.5, and the development system is 5.2.8, but I can't see anything in the change log that would affect this.
Thanks in advance.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro tips, advice, training, consultancy
Custom software for your business