Author Topic: cannot modify header <--- help  (Read 298 times)

0 Members and 1 Guest are viewing this topic.

Offline pimohdaimaoh

  • Senior Contributor
  • ****
  • Posts: 160
  • "Be aware to our nature"
    • PIMOHWEATHER
cannot modify header <--- help
« on: July 26, 2017, 02:44:35 AM »
Hello guys specially to Sir Ken

How to fix this error that suddenly appeared (see below message), before the site is ok for 4 months and this month, this error appeared, can you help to get rid of this error? since I checked all the scripts and I dont see any wrong. you can check the site http://pimohweather.webutu.com/wxindex.php Thank You.


"Warning: Cannot modify header information - headers already sent by (output started at /storage/ssd5/169/1132169/public_html/top.php:1) in /storage/ssd5/169/1132169/public_html/top.php on line 40"

My test Site:
http://pimohweather.webutu.com
My CWOP ID: EW0758

Offline hankster

  • Forecaster
  • *****
  • Posts: 460
    • NFM Weather
Re: cannot modify header <--- help
« Reply #1 on: July 26, 2017, 07:53:21 AM »
I'm not Ken :) but I have found that many times this is caused by having a space after the last ?> in the file.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1121
    • Support site Leuven Template and scripts
Re: cannot modify header <--- help
« Reply #2 on: July 26, 2017, 09:49:55 AM »
Hello guys specially to Sir Ken

How to fix this error that suddenly appeared (see below message), before the site is ok for 4 months and this month, this error appeared, can you help to get rid of this error? since I checked all the scripts and I dont see any wrong. you can check the site http://pimohweather.webutu.com/wxindex.php Thank You.


"Warning: Cannot modify header information - headers already sent by (output started at /storage/ssd5/169/1132169/public_html/top.php:1) in /storage/ssd5/169/1132169/public_html/top.php on line 40"
There are excellent debugging tools in the saratoga template. To check the  scripts, version, a.s.o.
When checking the structure of the scripts with
http://pimohweather.webutu.com/check-fetch-times.php?show=structure
You can see that there are two empty lines before the < ? p h p  at line 3
Those are interpreted as html and sent to the browser including the default headers.
But at line 40 the real headers should be sent => that results in the warning message.

As you mention this script is not modified in the last 4 months, the only conclusion is that error messaging is switched on by the provider.

Wim
Vantage VUE with a WLIP used for https://weer.sluispark.be/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/

Offline pimohdaimaoh

  • Senior Contributor
  • ****
  • Posts: 160
  • "Be aware to our nature"
    • PIMOHWEATHER
Re: cannot modify header <--- help
« Reply #3 on: July 26, 2017, 10:29:46 PM »
Hello guys specially to Sir Ken

How to fix this error that suddenly appeared (see below message), before the site is ok for 4 months and this month, this error appeared, can you help to get rid of this error? since I checked all the scripts and I dont see any wrong. you can check the site http://pimohweather.webutu.com/wxindex.php Thank You.


"Warning: Cannot modify header information - headers already sent by (output started at /storage/ssd5/169/1132169/public_html/top.php:1) in /storage/ssd5/169/1132169/public_html/top.php on line 40"
There are excellent debugging tools in the saratoga template. To check the  scripts, version, a.s.o.
When checking the structure of the scripts with
http://pimohweather.webutu.com/check-fetch-times.php?show=structure
You can see that there are two empty lines before the < ? p h p  at line 3
Those are interpreted as html and sent to the browser including the default headers.
But at line 40 the real headers should be sent => that results in the warning message.

As you mention this script is not modified in the last 4 months, the only conclusion is that error messaging is switched on by the provider.

Wim


Oh Thanks for your detailed explanation about this, well I cant understand how it was created the Missing before line 3 in header  , eversince im avoiding missing specially in headers because Im experiencing that before to my cloudbase scripts.

Yes, as I put a message on my meain page that the realdata sending from my sensors (including my seismometr) is temporary disabled, because Im transfering to my now location in Mindanao area and up to now no setup is done because my new developing house is not yet completed, no internet lines are installed yet because of some problems between the right of way by the owner of the land and to my internet provider, im working this as fast as possible.

thank you again for this, as soon I reinstated everything, I will take that error script to fix.

-Mike-
« Last Edit: July 26, 2017, 10:32:24 PM by pimohdaimaoh »

My test Site:
http://pimohweather.webutu.com
My CWOP ID: EW0758

 

anything