How to Run a Cron Job?

That’s the output from testtags. Ken’s is the same Saratoga-Weather.org - Home / Forecast :slight_smile:

Ok Try the index.php first, but it’s about 01:00 in the morning and I have to go too. Just try to remember which files you did modify and broke the site.

Also which php editor you use? try notepad++ it’s free, don’t use notepad or any other txt editor.

Renamed it to index.php and now get an internal server error. By the way I do use notepad ++

The issue (with the 500 error on index.php) is actually caused by a problem with nws-alerts-config.php – likely a PHP syntax error.

Since it fails, the page that includes it will also fail (index.php).

PHP is very unforgiving about syntax errors…

I uploaded, via Core FTP, a fresh untouched copy of the nws-alerts-config.php and still get the blank page. Totally and completely frustrated. I feel like it’s $70 just wasted.

What did the host support say/do?

The email I got from the hosting company says to use /usr/local/bin/php.

I did that and the cron job never worked. The main issue right now is the blank page.

Since you are addressing a complete newbie here I ask what to do to fix these things. I do very much appreciate your help!

The 'blank" page is not realy blank, it only does not display human readable text. When you do a “view source”, (in via Chrome right-click) you see that there are 140 lines of html and that the index.php is processed until the first script in the <body part.

visibility:visible;
}

</style>
<!-- end of flyout-menu.php CSS definition -->
<!-- World-ML template from http://saratoga-weather.org/wxtemplates/ -->
<!-- end of top -->
</head>
<body>

So can you post the index.php. Rename it first as index.php.txt
I just want to know what is called first in the body part.

Can you also post the nws-alerts-config.php as nws-alerts-config.php.txt.

Someone can then test it to see what the offending lines are causing this 500 error.

Wim

I have attached the files. Let me know if you need more and thanks!


index.php_20150914130140.txt (4.78 KB)

nws-alerts-config.php_20150914130216.txt (5.78 KB)

Change line 39 in nws-alerts-config.php from

$ourTZ         = 'America/Chicago    // Time Zone     http://www.php.net/manual/en/timezones.america.php

to

$ourTZ         = 'America/Chicago';   // Time Zone     http://www.php.net/manual/en/timezones.america.php

You forgot a quote/apostrophe and semicolon ';

Wim

The two settings files have no sce=view support as they contain confidential information. They will not display anything when called directly. I checked them, they contain correct data. As do most other scripts. The 500 error was a typo in the nws config file.
Wim

Excellent! That got the site back up? Why do I still have the cron message at the top of the screen I changed that the “true”?

It’s a trick question:

$noCron = true;

true = you DON’T have cron
false = you DO have cron

Could you please be more specific, what “that” did you " changed that the “true”?"

$noCron        = true;                     // true=not using cron, update data when cache file expires   false=use cron to update data

So if you set that to false, the script will not update and expect you run a cronjob to do the updates.

You can test the by setting it to false and the warnings will not change until you run a cronjob (with mu=1).

Wim

The pics should tell the story. I an set to true, but I still get the warning at the top of the webpage?


I don’t understand why you think the warning/suggestion to use cron should not be there. It is telling you that if you have more than 4 alerts selected (you have five) it would be a good idea to use a cron job but by setting $noCron = true; you are telling the script that you are not using a cron - so it shows the suggestion.

Niko, that’s also been the confusion. What counts as 5?

And I have tried to run a cron job, but the alert was still there?