Author Topic: Stupid Mistake Made - Help Needed to fix ** Solved **  (Read 677 times)

0 Members and 1 Guest are viewing this topic.

Offline Ian.

  • Forecaster
  • *****
  • Posts: 459
    • Chatteris Weather
Stupid Mistake Made - Help Needed to fix ** Solved **
« on: April 24, 2017, 03:39:04 PM »
Hi All,

I failed the basic test of not renaming a file before overwriting it, and now my https://www.chatteris.biz/wxstatus.php page is broken and I don't have a backup  :oops:

The problem stems from installing the latest include-wxstatus.php for World Base, I forgot I had made a change to the original and once overwritten, it broke the page, to get it working in the first place, Kens help was invaluble:

http://www.wxforum.net/index.php?topic=31488.msg315053#msg315053

I'm using a Meteobridge Pro and have tried changing the WXstation to 'MB' from 'MH' but still nothing, the wxstatus page part loads then hangs.

I've attached the file, could some kind sole take a look to see where my mistake is please.
« Last Edit: April 25, 2017, 01:49:06 PM by Ian. »
CWOP - DW3371
PWS - ICAMBRID16
https://www.chatteris.biz

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Stupid Mistake Made - Help Needed to fix
« Reply #1 on: April 24, 2017, 06:13:52 PM »
With your mods, you're likely missing one or more functions (seconds2human()).

The sec2hms() function is included in the include-wxstatus.php .. don't know where you had seconds2human() defined.. not my script :)

Try changing
Code: [Select]
<?php print seconds2human($WX['mbsystem-uptime']); ?> to
Code: [Select]
<?php print sec2hms($WX['mbsystem-uptime']); ?> and see if that fixes the blowup...
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Ian.

  • Forecaster
  • *****
  • Posts: 459
    • Chatteris Weather
Re: Stupid Mistake Made - Help Needed to fix
« Reply #2 on: April 25, 2017, 01:02:40 PM »
HI Ken,

Yet again you have saved the day!

The non saratoga code which was in include-wxstatus.php was to display months, days, hours, mins & secs, one thing my mistake has highlighted is that the backup download I had would not open, so I couldn't restore the effected files.

I've now downloaded all the .php files to a seperate folder and backed up, so fingers crossed I can be embarassed in private :-)

All the best

Ian
CWOP - DW3371
PWS - ICAMBRID16
https://www.chatteris.biz