The Adsense Idiot

Proving to myself that I can make money online

Archive for the ‘Problems & Fixes’ Category

I’m still having problems here and as a result still running tests

Edited:  It worked !!  I’ve been having problems with the Auto Social Plugin not working, the cause turned out to be related to the number of sites in my Ping list.  I’ve cleared the list and now I need to figure out which site might have been causing the script to timeout.

Tags: affiliate programs, theadsenseidiot

argh

argh !!

Tags: argh

Cannot modify header information - headers already sent by …

How often when you are fiddling with PHP scripts do you see that dreaded error ?  well if you are like me I bet its fairly often. 
I’m a complete dunce when it comes to actually coding anything in PHP, but I’m slowly learning a bit here and a bit there, so now I can kinda read through and figure out some of the more common easy stuff.

But what to do about this whole Cannot Modify Headers error ??

Today I found a nice clear explanation which I’m happy to include here for you :-)
This is commonly known as the “whitespace problem”.

The error message typically looks something like

Warning: Cannot modify header information - headers already sent by (output started at /path/to/blog/public_html/config.php:375) in /path/to/blog/public_html/system/file.php on line 180

(line numbers and file names may vary). The problem is caused when extra spaces and/or empty lines at the end of a file get added to the PHP file when you edit it.

This whitespace is then sent to the browser when the file is loaded and interferes with the header of a page being sent to the browser, causing the error.

The fix is, obviously, to remove that whitespace from the file. Read the error message carefully. It says “output started at …” followed by a file name and a line number. That is the file and line that you need to edit. Ignore the second file name - that is only a file that included the file that has the whitespace. The first file is the one you have to edit, not the second one.

There you go problem solved (hopefully)
 

Tags: making money online, theadsenseidiot