• Apr
    28


    “Warning: Cannot modify header information – headers already sent by (output started at /some/path/public_html/xxxx.php:50) in /some/path/public_html/some_dir/yyyy.php on line 250″

    If you have a PHP based web site, you may have encountered this Warning message. It’s frustrating when it happens. If you are a PHP guru, you may be able to solve it right away. For a newbie PHP programmer, it’s not obvious. I scratched my head when I first encountered this problem, and it took a long time to fix it.

    First, you need to check the obvious. Have you edited the files in your warning message before you started to get the warning? You need to remove any white space before and after .

    Then, you need to check to see if you are using header() before any output is sent. For example, the php.net gives some examples. Here’s another example.

    No Comments

Subscribe by Email
Enter your email address:

Delivered by FeedBurner

Holiday Shopping at Santa's Geek Shop - CompUSA.com