Page 2 of 7

Re: BT's Sager PHP Script V2 - For Cumulus

Posted: Mon 18 Mar 2019 2:09 pm
by beteljuice
OK ....

Let's check you haven't got a problem with cURL

Upload this to where your index page is located and give it call and see what happens.

curltest.zip

It should do two calls for METAR. 1st 'hard-coded' YSCB, the 2nd using value from bt-sager-cu.php

Something like: http://beteljuice.co.uk/sager/curltest.php (BTW using cu file you posted - no problem)

and the forecast from that file: http://beteljuice.co.uk/sager/sager_test.php

Re: BT's Sager PHP Script V2 - For Cumulus

Posted: Mon 18 Mar 2019 5:32 pm
by kocher
Greetings to all

I thank BetelJuice for publishing their ingenious creations.

I have installed the BT-Sager script, but I can not get it to work.

Here is the link to the file:

http://kocher.es/Sager-Forecast/sager_test.php


Saludos desde San Sebastian

Re: BT's Sager PHP Script V2 - For Cumulus

Posted: Mon 18 Mar 2019 7:42 pm
by PaulMy
@paul
I can't see any evidence they were included in the first place. Have you moved things around recently ?
Yes, have included both and not made any change recently. The Davis VP2 is now back to display. However, after a bit of investigation I have found I am using the original BT-sager version on komokaweather and Brian's (BCJKiwi) sagerCW version on my Saratoga and am not using the beteljuice V2 version so will post in another thread if needed.

Enjoy,
Paul

Re: BT's Sager PHP Script V2 - For Cumulus

Posted: Mon 18 Mar 2019 8:30 pm
by beteljuice
@kocher

Hi ....

Interesting, at first glance you seem to have the same problem as uncle_bob ...

Edit: Investigations continue, although I don't think there is anything the beteljuice has changed that would cause this.

Code: Select all

Notice: Undefined variable: w6 in H:\webspace\hostings\kocher.es\hosting\www\Sager-Forecast\sager_test.php on line 41
w6 = 115°

Notice: Undefined variable: wd in H:\webspace\hostings\kocher.es\hosting\www\Sager-Forecast\sager_test.php on line 42
wd = 0° 
Undefined, but then prints the value ??

Edit: Ahh, there should two values o/p !

OK. It's looking like same thing uncle_bob has, but what is it ?

Could you please try the curltest file I posted above ...

Re: BT's Sager PHP Script V2 - For Cumulus

Posted: Mon 18 Mar 2019 11:26 pm
by kocher
Good evening, BetelJuice

Here is the link address:

http://kocher.es/Sager-Forecast/curltest.php

Re: BT's Sager PHP Script V2 - For Cumulus

Posted: Tue 19 Mar 2019 12:01 am
by beteljuice
Thank you Kocher - now I am totally confused :lol:

... could you and / or uncle_bob please try this replacement file ?

Edit: redundant file removed

Re: BT's Sager PHP Script V2 - For Cumulus

Posted: Tue 19 Mar 2019 2:22 am
by uncle_bob
Hi BettleJuice,
I installed the new wc file. Still the same issue.
Then I installed the curltest, took a few seconds to come back with this so it looks like it's working...

Code: Select all

cURL TEST

cURL is installed on this server

Running tests ...

Hard coded YSCB:

HTTP/1.1 200 OK
Date: Tue, 19 Mar 2019 02:19:52 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Last-Modified: Tue, 19 Mar 2019 02:07:17 GMT
ETag: "487aa86-6e-58468f6e938aa"
Accept-Ranges: bytes
Content-Length: 110
Vary: Accept-Encoding
Content-Type: text/plain; charset=UTF-8
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload

2019/03/19 02:00 YSCB 190200Z AUTO 11010KT 9999 // SCT035 BKN044 24/14 Q1015 INTER 0400/0500 5000 SHRA BKN020

From bt-sager-cu: YSCB:

HTTP/1.1 200 OK
Date: Tue, 19 Mar 2019 02:19:53 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Last-Modified: Tue, 19 Mar 2019 02:07:17 GMT
ETag: "487aa86-6e-58468f6e938aa"
Accept-Ranges: bytes
Content-Length: 110
Vary: Accept-Encoding
Content-Type: text/plain; charset=UTF-8
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload

2019/03/19 02:00 YSCB 190200Z AUTO 11010KT 9999 // SCT035 BKN044 24/14 Q1015 INTER 0400/0500 5000 SHRA BKN020 
Sorry to be such a PITA with this, but thanks for the all the help!

Re: BT's Sager PHP Script V2 - For Cumulus

Posted: Tue 19 Mar 2019 2:44 am
by beteljuice
@uncle_bob

That's not the new wc file that's running ...

It's the d*mn program that's being a PITA - don't worry ..

Re: BT's Sager PHP Script V2 - For Cumulus

Posted: Tue 19 Mar 2019 3:35 am
by beteljuice
Hmm ... I have a lurking suspicion ...

Try this:
Edit: redundant file removed

Re: BT's Sager PHP Script V2 - For Cumulus

Posted: Tue 19 Mar 2019 5:16 am
by uncle_bob
Yet Another WC file loaded up. Still broken :/
Code view:

Code: Select all

<!-- bt-sager-wc loaded -->
<!-- server running PHP ver 5.5.19 -->
<!-- cURL is installed OK -->
<!-- Loading bt-sager-cu > success -->
<!-- Looking for language info -->
<!-- Trying to load bt-sager-en.php -->
<!-- Language file loaded .... -->
<!-- getting METAR for YSCB -->
<!-- METAR FAIL or corrupted [] -->

Re: BT's Sager PHP Script V2 - For Cumulus

Posted: Tue 19 Mar 2019 5:41 am
by beteljuice
This is truly ridiculous - try this one (but this one shouldn't work !)

Edit: redundant file removed

Re: BT's Sager PHP Script V2 - For Cumulus

Posted: Tue 19 Mar 2019 5:54 am
by uncle_bob
Here's the sauce view :)

Code: Select all

<!-- bt-sager-wc loaded -->
<!-- server running PHP ver 5.5.19 -->
<!-- cURL is installed OK -->
<!-- Loading bt-sager-cu > success -->
<!-- Looking for language info -->
<!-- Trying to load bt-sager-en.php -->
<!-- Language file loaded .... -->
<!-- getting METAR for YSCB -->
<!-- METAR FAIL or corrupted [] -->
<br />
<b>Notice</b>:  Undefined variable: pw in <b>D:\xampp\htdocs\cond\bt-sager-wc.php</b> on line <b>769</b><br />
<br />
<b>Notice</b>:  Undefined variable: pw in <b>D:\xampp\htdocs\cond\bt-sager-wc.php</b> on line <b>771</b><br />
<br />
<b>Notice</b>:  Undefined variable: pw in <b>D:\xampp\htdocs\cond\bt-sager-wc.php</b> on line <b>773</b><br />
<br />
<b>Notice</b>:  Undefined variable: pw in <b>D:\xampp\htdocs\cond\bt-sager-wc.php</b> on line <b>775</b><br />
<br />
<b>Notice</b>:  Undefined variable: pw in <b>D:\xampp\htdocs\cond\bt-sager-wc.php</b> on line <b>777</b><br />
<br />
<b>Notice</b>:  Undefined variable: d4 in <b>D:\xampp\htdocs\cond\bt-sager-wc.php</b> on line <b>782</b><br />
I don't believe it's any thing you've done (or BT for that matter) but something messed up on my system.
BTW, I am commenting out the bottom line of the file, as per the instructions.

Re: BT's Sager PHP Script V2 - For Cumulus

Posted: Tue 19 Mar 2019 5:56 am
by beteljuice
OK, you've already downloaded it :lol:

Here's yet another if that doesn't work, fingers crossed ....

bt-sager-wc.zip

Re: BT's Sager PHP Script V2 - For Cumulus

Posted: Tue 19 Mar 2019 6:02 am
by uncle_bob
Hey, it's working!! :)

Re: BT's Sager PHP Script V2 - For Cumulus

Posted: Tue 19 Mar 2019 6:05 am
by uncle_bob
Sager forecast:
Rain and turning cooler then improvement likely in 24 hours; Storm to Violent Storm (89-117 km/h) South or Southeast winds becoming South or Southwest winds.

BoM forecast:
Shower or two.
Chance of any rain: 60%
Partly cloudy. Medium (60%) chance of showers, becoming less likely later tonight. The chance of a thunderstorm. Light winds.

Sager might be a little extreme, we'll see :)