1 americymru Nov 18, 2007 06:51
3 americymru Nov 19, 2007 04:32
I used gedit on Ubuntu. I run Ubuntu on both my desktop and on my server. I dont have a windows box so I guess Im out of the running for the 2 editors you mentioned. I wondered though, how do I just suppress php errors. I cant imagine that this is a serious problem of any kind and I just want it off the screen.
Thanks
CS
4 afwas Nov 19, 2007 04:48
The 'can't send header information' is some kind of a serious error. With any editor you can check for whitespace bedore the first <?php or after the closing ?>. I mention the ediors because many edit php files with a html editor or even Word, causing this type of errors.
Good luck
5 americymru Nov 19, 2007 04:57
After checking _main.php it appears that I somehow pasted a few lines of the analytics code there when I was inserting the rest of it before the </body> tag at the bottom of the page. How the hell that ahppened I do not know. Anyway I have removed the offending lines but the error message is still being displayed.
6 afwas Nov 19, 2007 04:59
Try again with a fresh copy of _main.php.
Good luck
7 americymru Nov 19, 2007 05:04
Looks like you were right. I just hit remove trailing spaces in gedit which i assume clears all the pesky white space and lo... the bloody thing is working fine again. Many thanks. Does this mean I lose the last 24 hours google analytics data?
Best regards CS
8 afwas Nov 19, 2007 05:10
Well done
americymru wrote:
Does this mean I lose the last 24 hours google analytics data?
Best regards CS
I don't know. Your analytics seem to have worked fine all the time, so I guess you haven't lost data.
Happy blogging
What editor did you use? It looks like your editor added whitespace (a space or a new line) before the first <?php. For editing php files I recommend [url=http://notepad-plus.sourceforge.net/uk/news.php?lang=uk]Notepad++[/url] or [url=http://www.crimsoneditor.com/]Crimson editor[/url] or notepad.
Google analytics code is placed right before </body>.
Good luck