Author Topic: River Level script *SOLVED*  (Read 534 times)

0 Members and 1 Guest are viewing this topic.

Offline tigerbait

  • Member
  • *
  • Posts: 46
    • Ellerbe Weather
River Level script *SOLVED*
« on: March 07, 2023, 03:38:04 PM »
Thanks again to Ken for solving my issue.  Here is the correction he made if anyone has future issues.

If all you have for the command in the cron spec is:
Code: [Select]
/usr/local/bin/php /home/tigerbait64/public_html/River/river-fetch.phpthat won't work (as you've likely found out.  '.php' is not a *nix executable directly, and cron doesn't run in your public_html directory.  You'll likely need a command like:

Code: [Select]
cd $HOME/public_html/River;php -q river-fetch.php > status.txt 2>&1
to do two things:
change the directory to the River subdirectory in your document root.
invoke the PHP interpreter to run your script sending both SYSOUT and SYSERR to a status.txt file.

After it runs, you should be able to see /River/status.txt on your website with the pull results.



Good afternoon gentlemen,
I am having trouble getting my wxriverdetail page to populate.  Comes up with formatting error <p>id='' is not formatted correctly.</p>
https://www.sporttiger.com/wxriverpage.php seems fine.  I have all the latest scripts that Ken put out for this page.
Here is an error code
07-Mar-2023 13:35:19 America/Chicago] PHP Warning:  simplexml_load_file(): I/O warning : failed to load external entity &quot;./River/river-SVPL1.txt&quot; in /home/tigerbait64/public_html/wxriverpage.php on line 138
[07-Mar-2023 13:35:03 America/Chicago] PHP Warning:  Undefined variable $RiverGauge in /home/tigerbait64/public_html/wxriverpage.php on line 77
[07-Mar-2023 13:35:03 America/Chicago] PHP Warning:  foreach() argument must be of type array|object, null given in /home/tigerbait64/public_html/wxriverpage.php on line 77
[07-Mar-2023 13:35:03 America/Chicago] PHP Warning:  Undefined variable $first_key in /home/tigerbait64/public_html/wxriverpage.php on line 83

I am running a Crons job within my Cpanel

Thanks in advance
« Last Edit: March 08, 2023, 01:19:15 PM by tigerbait »
https://www.sporttiger.com
Davis VP2 Weather Display
Saratoga scripts

 

anything