wxstatus issues (SOLVED)

Hey guys,

Put 2 custom checks in and the time stamps are not working. Can anyone help with this issue.

One file is updated every minute

the other file is updated every 5 minutes

on the status page it states the last time was 4**** hours ago

we are confused

thanks

You’ll need to post the code you inserted in wxstatus.php that causes the display

NWS-ALERTS NOT Current 419763:57:32 > 0:10:15
WEBCAM IMAGE NOT Current 419763:57:32 > 0:01:15

Sorry Ken,

$tDir = ‘./’;
if(file_exists($tDir.‘nws-alerts.php’)) {
do_check(langtransstr(“NWS-ALERTS”),$tDir.‘nws-alerts.php’,10*60+15,‘nws-alerts.php’);

    }

$tDir = ‘./’;
if(file_exists($tDir.‘fixed1.jpg’)) {
do_check(langtransstr(“WEBCAM IMAGE”),$tDir.‘fixed1.jpg’,1*60+15,‘fixed1.jpg’);

    }

The first one should be

$tDir = './cache/';
      if(file_exists($tDir.'nws-alerts.php')) {
           do_check(langtransstr("NWS-ALERTS"),$tDir.'nws-alertsMainData.php',10*60+15,'file');
      
        }

and that will check one of the output files updated by nws-alerts.php script. You were checking the age of the nws-alerts.php script itself, not one of the files it produces.

The second one should be

$tDir = './';
      if(file_exists($tDir.'fixed1.jpg')) {
           do_check(langtransstr("WEBCAM IMAGE"),$tDir.'fixed1.jpg',1*60+15,'file');
      
        }

Note that the third argument to do_check in both cases is ‘file’ (indicating that a filemtime check is to be done on a file in the filesystem)

Hey Ken,

put the new code into the wxstatus.php page and updated it. Got the webcam image to come up correctly but now the NWS-DATA did not come up.

http://www.southturnermaineweather.com/wxstatus.php

Matt

Sorry… that code should be

$tDir = './cache/';
      if(file_exists($tDir.'nws-alertsMainData.php')) {
           do_check(langtransstr("NWS-ALERTS"),$tDir.'nws-alertsMainData.php',10*60+15,'file');
     
        }

I forgot to change both instances of the file to check.

Thanks Ken,

Works great now.