Author Topic: wxgraphic  (Read 719 times)

0 Members and 1 Guest are viewing this topic.

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
wxgraphic
« on: May 27, 2019, 12:36:46 AM »
Not sure why... I no longer see the icon that displays the current weather on my graphic banner.
It used too...  :sad:

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxgraphic
« Reply #1 on: May 27, 2019, 12:50:54 AM »
Looks like you're using Meteohub to create the clientraw.txt -- Meteohub's simulation of that file does not include a 'current weather' condition icon number, so no icon would be shown.

Also, looking at the WD Parser for your site shows both clientraw.txt and clientrawhour.txt are missing.. the more troubling is the clientraw.txt, since the wxgraphic/config.txt cites it as the source of your conditions.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
Re: wxgraphic
« Reply #2 on: May 27, 2019, 01:18:02 AM »
Looks like you're using Meteohub to create the clientraw.txt -- Meteohub's simulation of that file does not include a 'current weather' condition icon number, so no icon would be shown.

Also, looking at the WD Parser for your site shows both clientraw.txt and clientrawhour.txt are missing.. the more troubling is the clientraw.txt, since the wxgraphic/config.txt cites it as the source of your conditions.

That's odd Ken,

They are there...

Code: [Select]
erfue2@ps609727:~/txweather.org/wxgraphic$  ls -lart ../MHub/clientraw*
-rw-r--r-- 1 ferfue2 pg8310608 2706 May 26 22:00 ../MHub/clientrawextra.txt
-rw-r--r-- 1 ferfue2 pg8310608 2152 May 26 22:00 ../MHub/clientrawdaily.txt
-rw-r--r-- 1 ferfue2 pg8310608  693 May 26 22:12 ../MHub/clientraw.txt
-rw-r--r-- 1 ferfue2 pg8310608 2775 May 26 22:12 ../MHub/clientrawhour.txt

I think that the client file is acting up due to the re-computation of meteohub's data. I just got it to add my secondary station so when that happens all files go kinda wonky....
I saw where the clientraw.txt file went to 0KB and than again with some data...
Thats odd, I allways used meteohub to create the file and I had the 'current weather' condition icon... I did change my station... I had Meteohub pulling data from WLIP and I just changed it a few days ago to use to using Meteostick... Maybe thats why?

Thanks again Ken!

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

Offline UpstateWeather.com

  • Signature
  • Contributor
  • ***
  • Posts: 146
    • Upstate Weather
Re: wxgraphic
« Reply #3 on: May 28, 2019, 11:36:25 AM »
So this is unrelated to the original question at hand, but I was just about to post a new question related to the script.

I can't get the wxgraphic script to work any more. It did months ago but now it's not.

The image just won't load any text, icons, etc. The error_log shows the following:

PHP Warning:  imagettftext(): Problem loading glyph
PHP Notice:  Undefined variable: anti_alias
PHP Warning:  imagettfbbox(): Problem loading glyph

I SUSPECT it's because of PHP but not sure. Here's my main question to start off my investigation on what's happening...

I'm using PHP 7.3 on my site. 1st - does this script work with 7.3?
What php extensions need to be loaded for the script to work? See the attachment for available options on my host.

https://www.ericboettner.com/weather/wxlogo.php

Thanks!
Eric




Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
Re: wxgraphic
« Reply #4 on: May 28, 2019, 11:47:26 AM »
So this is unrelated to the original question at hand, but I was just about to post a new question related to the script.

I can't get the wxgraphic script to work any more. It did months ago but now it's not.

The image just won't load any text, icons, etc. The error_log shows the following:

PHP Warning:  imagettftext(): Problem loading glyph
PHP Notice:  Undefined variable: anti_alias
PHP Warning:  imagettfbbox(): Problem loading glyph

I SUSPECT it's because of PHP but not sure. Here's my main question to start off my investigation on what's happening...

I'm using PHP 7.3 on my site. 1st - does this script work with 7.3?
What php extensions need to be loaded for the script to work? See the attachment for available options on my host.

https://www.ericboettner.com/weather/wxlogo.php

Thanks!
Eric





Mine runs on PHP 7.3

I looked at your config file and I saw this:

$degree_units = '蚌';

Maybe thats why it stop working?

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

Offline UpstateWeather.com

  • Signature
  • Contributor
  • ***
  • Posts: 146
    • Upstate Weather
Re: wxgraphic
« Reply #5 on: May 28, 2019, 12:04:07 PM »
So this is unrelated to the original question at hand, but I was just about to post a new question related to the script.

I can't get the wxgraphic script to work any more. It did months ago but now it's not.

The image just won't load any text, icons, etc. The error_log shows the following:

PHP Warning:  imagettftext(): Problem loading glyph
PHP Notice:  Undefined variable: anti_alias
PHP Warning:  imagettfbbox(): Problem loading glyph

I SUSPECT it's because of PHP but not sure. Here's my main question to start off my investigation on what's happening...

I'm using PHP 7.3 on my site. 1st - does this script work with 7.3?
What php extensions need to be loaded for the script to work? See the attachment for available options on my host.

https://www.ericboettner.com/weather/wxlogo.php

Thanks!
Eric





Mine runs on PHP 7.3

I looked at your config file and I saw this:

$degree_units = '蚌';

Maybe thats why it stop working?

That's odd, on my end, this is what is in the config file.... any idea what causes the change?

$degree_units = '°F';

Offline hymrog

  • Senior Member
  • **
  • Posts: 52
    • Gahanna Weather
Re: wxgraphic
« Reply #6 on: May 28, 2019, 03:34:58 PM »
Hello -

Have you checked to be sure GD is running on your site if GD is not running enable it.  If GD is running make sure the path to your fonts is set correctly.  Take a look at the PHP Manual for some guidance or Google the error "PHP Warning:  imagettfbbox():"

Also take a look for this in the wxlogo config.txt file 
Code: [Select]
$font_file = './Arial.ttf'  If that is missing or commented that may be cause of the problem.

g

Offline UpstateWeather.com

  • Signature
  • Contributor
  • ***
  • Posts: 146
    • Upstate Weather
Re: wxgraphic
« Reply #7 on: May 28, 2019, 03:54:51 PM »
Hello -

Have you checked to be sure GD is running on your site if GD is not running enable it.  If GD is running make sure the path to your fonts is set correctly.  Take a look at the PHP Manual for some guidance or Google the error "PHP Warning:  imagettfbbox():"

Also take a look for this in the wxlogo config.txt file 
Code: [Select]
$font_file = './Arial.ttf'  If that is missing or commented that may be cause of the problem.

g

THAT DID IT! Awesome, you rock, thank you!! (I had two issues - corrupt font file and it was the wrong path.)