Sandaysoft

Support forum for Cumulus weather station software
It is currently Mon May 20, 2013 3:15 pm
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: WU-graphs php header problem.
PostPosted: Sun Feb 05, 2012 5:56 pm 
Offline
User avatar

Joined: Sun Jul 03, 2011 6:23 pm
Posts: 324
Location: Eastleigh, Hampshire, UK
Weather Station: Davis VP2 - 24hr FARS
Operating System: Windows 7 - 64 bit
I guess this problem is aimed at the PHP gurus ;) .

I have WU-graphs running as "stand alone" here:http://www.nightingaleweather.co.uk/wugraphs.php.

But when I use include on a page where I want it I get this:

Quote:
Warning: Cannot modify header information - headers already sent by (output started at /home/*********/public_html/template101.php:15) in /home/night239/public_html/wugraphs.php on line 35

Warning: Cannot modify header information - headers already sent by (output started at /home/*********/public_html/template101.php:15) in /home/night239/public_html/wugraphs.php on line 44

Warning: Cannot modify header information - headers already sent by (output started at /home/*********/public_html/template101.php:15) in /home/night239/public_html/wugraphs.php on line 45

Warning: Cannot modify header information - headers already sent by (output started at /home/*********/public_html/template101.php:15) in /home/night239/public_html/wugraphs.php on line 46



Page is here:http://www.nightingaleweather.co.uk/template101.php

It produces one of these every time there is "<?php".

For example, the one above is line 15 in template101.php which is include cumulustags. If I delete this from template101 it does the same on the next "<?php" which is header and so on right down to the footer and including itself :roll:

Quote:
<?php
include("wugraphs.php");
?>


I also placed it on an empty page and the same result: http://www.nightingaleweather.co.uk/template105.php

Quote:
Warning: Cannot modify header information - headers already sent by (output started at /home/*******/public_html/template105.php:11) in /home/night239/public_html/wugraphs.php on line 35


The line 11 here where it fails is its own <?php.

Quote:
<?php
include("wugraphs.php");
?>

So what is going on?

_________________
Duke

Nightingale Weather PHP
Eastleigh, Hampshire, UK


Top
 Profile  
 
 Post subject: Re: WU-graphs php header problem.
PostPosted: Sun Feb 05, 2012 11:31 pm 
Online
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1846
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
Without actually seeing both your template code and / or delving into the WU-Graphs code, I would hazard the guess that there is an 'include' or 'stand-alone' option.

You would seem to have the stand-alone option but trying to use it as an include. - I think

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Top
 Profile  
 
 Post subject: Re: WU-graphs php header problem.
PostPosted: Tue Feb 07, 2012 11:16 pm 
Offline

Joined: Wed Feb 01, 2012 12:16 pm
Posts: 2
Location: Woodmill, Southampton, UK
Weather Station: Fine Profile Wireless
Operating System: Window 7 Pro / Centos5
Whenever I get

Warning: Cannot modify header information - headers already sent

errors in php they are usually caused by characters getting through to the browser before php sends its headers. This is often due to spurious spaces before an opening <?php tag in one of your includes.

Hope this helps.


Top
 Profile  
 
 Post subject: Re: WU-graphs php header problem.
PostPosted: Fri Feb 17, 2012 12:11 am 
Offline

Joined: Wed May 13, 2009 9:35 am
Posts: 110
Location: Nr Ilkley, West Yorks, UK
Weather Station: WMR-200
Operating System: Windows 7
I was looking on your website and it looks like you resolved your problem.
I have been trying to do something similar based on Jacque's Sunny Weather template.
So, to point me in the right direction, as I'm trying to get to grips with PHP in a simple form, do you just "call" the wugraphs.php page from within another PHP page using the include statement you've detailed above?
And what was the final reason for the problem?
Hope you can help?

_________________
bigmac
Menston Weather


Top
 Profile  
 
 Post subject: Re: WU-graphs php header problem.
PostPosted: Fri Feb 17, 2012 1:26 pm 
Offline
User avatar

Joined: Sun Jul 03, 2011 6:23 pm
Posts: 324
Location: Eastleigh, Hampshire, UK
Weather Station: Davis VP2 - 24hr FARS
Operating System: Windows 7 - 64 bit
All I've done to get it working is to "include" as above and then simply edit out each line that produces an error. I think there are about 10 lines on the WUGraphs page and 3 in the config. If you simply upload it to your site and go to the page you "include", the errors will be listed with the line number you need to edit out. Better still use XAMPP.

I shall be revisiting this page soon and I am told the best way is not to include but to basicly cut and paste the wugraphs to the page where you want them and play with it from there.

Hope this helps.

Duke

_________________
Duke

Nightingale Weather PHP
Eastleigh, Hampshire, UK


Top
 Profile  
 
 Post subject: Re: WU-graphs php header problem.
PostPosted: Fri Feb 17, 2012 1:38 pm 
Online
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1846
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
See my earlier post - there is a 'flag' to set to say you are using it as include, otherwise it tries to create a stand-alone page with its own headers in the page you've already got headers for !

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Top
 Profile  
 
 Post subject: Re: WU-graphs php header problem.
PostPosted: Fri Feb 17, 2012 2:36 pm 
Offline
User avatar

Joined: Sun Jul 03, 2011 6:23 pm
Posts: 324
Location: Eastleigh, Hampshire, UK
Weather Station: Davis VP2 - 24hr FARS
Operating System: Windows 7 - 64 bit
Quote:
there is a 'flag' to set to say you are using it as include,


This was already set to "true" for include mode and did not resolve my problems. The only way for me to get this to work was "//".

Just in case I got it wrong before, just tried again with the same problem. if you want to try "include = true" I think it's line 363 in WUGsettings.

Duke

_________________
Duke

Nightingale Weather PHP
Eastleigh, Hampshire, UK


Top
 Profile  
 
 Post subject: Re: WU-graphs php header problem.
PostPosted: Sat Feb 18, 2012 12:27 am 
Offline

Joined: Wed May 13, 2009 9:35 am
Posts: 110
Location: Nr Ilkley, West Yorks, UK
Weather Station: WMR-200
Operating System: Windows 7
Thanks Duke and Beteljuice, won't get to try this out until next week sometime, but thanks for the advice.
I'll see how it pans out and come back for more guidance if needs be.

_________________
bigmac
Menston Weather


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot], N0BGS and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group