Getting 'Cannot add header information' on some servers only

General discussions related to php

Moderators: macek, egami, gesf

DoppyNL

Postby DoppyNL » Mon Oct 28, 2002 6:38 am

on line 12 your sending a header back to the user, but some output is already sent to the user on line 3, so it can't send the header anymore.
you can use ob_start to start ouput buffering at the beginning of your script and use ob_flush to start sending data back to the user. You can also send the header before any data is send to the user.

Why your webhost gives the error and your computer doesn't I'm not sure, maybe they got output buffering on by default for some reason.
You should check the configuration for that.
check the configuration of php with a file with these contents:

Code: Select all

<?php
phpinfo();
?>


Greetz Daan

Return to “PHP General”

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest