DIYtheme and PHP fatal error

Well, I was cruising along, making nice changes to my DIY Theme template when all of sudden, bam! I was faced with this error message:

Warning: Cannot modify header information – headers already sent by (output started at /home/kevin201/public_html/allthumbsdiy/wp-content/themes/thesis_18b1/custom/custom_functions.php:292) in /home/kevin201/public_html/allthumbsdiy/wp-includes/pluggable.php on line 890

Thankfully, I have been getting into a good habit of backing up my two critical files, custom.css and custom-functions.php, BEFORE making any changes so I knew I could always fall back on my latest archive to make this error message go away (oh yeah, you need to make sure you can get to these files from your cpanel, not just through wp-admin/DIY Theme).

But I first wanted to find out what caused this error message to pop up all of sudden. Researching on the internet pointed me to a rather simple, potential root cause: a blank space immediately preceeding the “<?php” tag or a blank space immediately following the “?>” closing tag.

If you have a dreamweaver, you can copy the entire custom-fuctions.php file to a notepad, save as test.php (make sure to choose the file type as “all files”) then imported in. that will conveniently tell you which line has the offending blank space.

Otherwise, if you don’t have DW, just to a quick find in notepad for all php tags.

After spending little of 15 minutes, I was able to resolve this problem. Maybe it will help you as well?

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.