Author Topic: Saratoga Templates on Raspberry Pi 3  (Read 684 times)

0 Members and 1 Guest are viewing this topic.

Offline K4RQ

  • Member
  • *
  • Posts: 2
    • Poplar Trails Weather
Saratoga Templates on Raspberry Pi 3
« on: September 20, 2017, 03:05:51 PM »
Wanting to use the Saratoga Templates here but the ajax-gizmo doesn't seem to be rendering for me.
Setup:
Raspberry Pi 3
Raspian
Apache 2
PHP 5

I extracted Base-USA zip file and MB-plugin zip file to the Pi root directory, /var/www/html
I've made no other changes or edits to any file.
Page loads and displays header, sidebar, regional map and radar but then nothing else.
No current conditions, no footer displayed.  I know the data will not be current
but shouldn't it show the old data?

Same base files loaded with no edits on Win 7 IIS will render the full page and stored current condition data.

http://k4rq.no-ip.org/wxindex.php

Is there something else I need to install?

Java is installed version "1.8.0_65".

Thanks for any guidance and all comments welcome.

K4RQ

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1126
    • Support site Leuven Template and scripts
Re: Saratoga Templates on Raspberry Pi 3
« Reply #1 on: September 20, 2017, 03:34:37 PM »
Wanting to use the Saratoga Templates here but the ajax-gizmo doesn't seem to be rendering for me.
Setup:
Raspberry Pi 3
Raspian
Apache 2
PHP 5

I extracted Base-USA zip file and MB-plugin zip file to the Pi root directory, /var/www/html
I've made no other changes or edits to any file.
Page loads and displays header, sidebar, regional map and radar but then nothing else.
No current conditions, no footer displayed.  I know the data will not be current
but shouldn't it show the old data?

Same base files loaded with no edits on Win 7 IIS will render the full page and stored current condition data.

http://k4rq.no-ip.org/wxindex.php
Your scripts fail when loading the forecast.
Check the html: In chrome => right click => select "Show HTML source"  (I use Dutch version, so check similar wording for English)
Code: [Select]
<!--  ajax-dashboard.php - Version 1.26 - 12-Jan-2013 - Multilingual -->
<!-- fcstby='' fcstscript='advforecast2.php' fcstorg='NWS' -->
This is Saratoga main checking script: http://k4rq.no-ip.org/check-fetch-times.php
Ends with the same forecast script error:
Code: [Select]
--checking NWS Forecast URL --
Using first entry in Settings.php $SITE['NWSforecasts'] for test.
URL: https://api.weather.gov/points/37.2639,-122.022/forecast
Cache: ./cache/forecast-CAZ513-test-json.txt
1. You should completely empty your cache/ folder.
2. If the problem is still there, unzip and move the small attached script to your root
3. Use http://k4rq.no-ip.org/testit.php  and it will FIRST set error reporting to ALL and then load wxindex.php
Probably we will see more error messages and not a blank screen.

Some other checks look OK:
http://k4rq.no-ip.org/check-fetch-times.php?show=settings => OK for now
http://k4rq.no-ip.org/check-fetch-times.php?show=structure => OK

BUT when accessing outside files, the script fails again:  http://k4rq.no-ip.org/check-fetch-times.php?show=versions
Code: [Select]
Webserver OS: <b>Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l</b><br/>
PHP Version: <b>5.6.30-0+deb8u1</b><br/>
Document root: <b>/var/www/html</b><br/>
allow_url_fopen = <b>ON</b><br/>
allow_url_include = <b>off</b></p>
<pre>
..fetching recent version information.

All scrips NOT accessing outside contents work normally:
http://k4rq.no-ip.org/wxstatus.php
http://k4rq.no-ip.org/wxlinks.php
http://k4rq.no-ip.org/wxtrends.php

Are you sure you allowed the webserver to access outside files using CURL?

It seems that scripts accessing files using CURL seems to fail.
As shown in this check:   http://k4rq.no-ip.org/check-fetch-times.php?show=info
Code: [Select]
Status of needed built-in PHP functions:
function simplexml_load_file is available
function iconv is available
function json_decode is available
function curl_init is NOT available
function curl_setopt is NOT available
function curl_exec is NOT available
function curl_error is NOT available
function curl_close is NOT available

Please make sure that your Apache server contains all needed components.

Wim


« Last Edit: September 20, 2017, 04:12:43 PM by wvdkuil »
Vantage VUE with a WLIP used for https://weer.sluispark.be/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/

Offline K4RQ

  • Member
  • *
  • Posts: 2
    • Poplar Trails Weather
Re: Saratoga Templates on Raspberry Pi 3
« Reply #2 on: September 20, 2017, 05:01:29 PM »
CURL was the missing link.  Current conditions populated and they even appear to be showing live data from Meteobridge.  Many thanks for pointing me in the right direction.  I may even get some sleep tonight.  :grin:

George
K4RQ