WXforum.net
Web Weather => Weather Website PHP/AJAX scripting => Custom Website Templates => Topic started by: andro700 on April 27, 2022, 03:28:34 PM
-
I am having issues with my river page. I have to disable warnings in my php.ini file or the page will not load due to so many errors or it takes a long time to load. It is East Masonville Weather script. I have sent him a email and have not gotten a response.
[24-Apr-2022 13:32:11 America/Los_Angeles] PHP Warning: simplexml_load_file(): ./river-LNDW1.txt:1: parser error : Document is empty in /home/goblesweather/www/www/River/river-fetch.php on line 110
Here is the link to this file https://www.goblesweather.com/River/river-LNDW1.txt (https://www.goblesweather.com/River/river-LNDW1.txt) It is not empty.
[24-Apr-2022 13:32:11 America/Los_Angeles] PHP Warning: simplexml_load_file(): in /home/goblesweather/www/www/River/river-fetch.php on line 110
[24-Apr-2022 13:32:11 America/Los_Angeles] PHP Warning: simplexml_load_file(): ^ in /home/goblesweather/www/www/River/river-fetch.php on line 110
Here is the line 110
$xmlData["$riverid"] = simplexml_load_file($xmlFileData);
I have attached a copy of my river-fetch script.
When I click on any of the links to any river the page is blank.
Chuck
-
You should try the attached update.. it works on PHP 8.1
-
Are there other files somewhere for a new install?
Looking for river-config.php
Can't tell if river-status.php is needed or created.
Assuming /River/ has to be set for write access.
Anything else needed to setup?
Thanks.
-
Yes, the file I attached just contains the changed files from the last distribution.
Attached is the last full distribution I have .. just overwrite it with the update above and you'll have a complete set.
-
Thanks, Ken! [tup] =D> \:D/ =D>
This page hasn't worked for me for quite some time now. But happily thanks to you it's fixed (https://gwwilkins.org/wxriverpage.php)!
I even remembered to reactivate my 'river-fetch.php' CRONS. :-)
-
You're welcome :)
The last version of the script from eastmasonvilleweather.com was 3.13F in 2015.
I did some fixes in June, 2020 for a 3.13G version, and I've merged in the PHP 8+ fixes for a 3.13H version attached.
-
I am getting the following errors when I try and run a cron job for the river-fetch.php file. I have the latest H river script. Any clues.
/home/goblesweather/www/www/River/river-fetch.php: line 1: ?php
: No such file or directory
/home/goblesweather/www/www/River/river-fetch.php: line 14: syntax error near unexpected token `"river-config.php"'
/home/goblesweather/www/www/River/river-fetch.php: line 14: `include("river-config.php");
'
Chuck
-
I'm not sure what cron command you are using, but you need to run the PHP interpreter and pass it the river-fetch.php file.
It looks like (based on the error message, you're just trying to run the river-fetch.php file directly.
Your cron command should look like:
/usr/local/php81/bin/php -q /home/goblesweather/www/www/River/river-fetch.php
-
I will check it out. I am running the cron job via my web host.
Chuck
-
I got it working using Curl and System Scheduler. Don't know why I didn't think of this way sooner. Much less headache than trying to figure cron jobs on my web host site.
Chuck