Author Topic: Problems with wugraphs  (Read 1970 times)

0 Members and 1 Guest are viewing this topic.

Offline sheldon

  • Senior Member
  • **
  • Posts: 93
    • Roma EUR Meteo
Problems with wugraphs
« on: October 20, 2016, 01:05:20 PM »
Hi,
I'm trying to use wugraphs on my website, but some problems occurred.
I followed the short guide on the official website: http://pocasi.hovnet.cz/wxwug.php and everything seems gone well.
This is what I see in http://www.romaeurmeteo.it/wxwugraphs/WUG-test.php
 [ You are not allowed to view attachments ]

But when I open http://www.romaeurmeteo.it/wugraphs.php I don't see any graphs.
 [ You are not allowed to view attachments ]

What did I do wrong?

Thanks,
Andrea
My weather Station in Rome:
http://www.romaeurmeteo.it/

Offline sheldon

  • Senior Member
  • **
  • Posts: 93
    • Roma EUR Meteo
Re: Problems with wugraphs
« Reply #1 on: October 22, 2016, 06:17:32 AM »
Uppete
My weather Station in Rome:
http://www.romaeurmeteo.it/

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 923
    • North Bend Weather
Re: Problems with wugraphs
« Reply #2 on: October 22, 2016, 08:10:55 PM »
This page... http://www.romaeurmeteo.it/wxwugraphs/WUG-test.php

Is password protected.

Is this the page your trying to get working? http://www.northbendweather.com/wxwugraphs.php
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Logitech Webcam + Soil temp + Soil Moisture

Offline sheldon

  • Senior Member
  • **
  • Posts: 93
    • Roma EUR Meteo
Re: Problems with wugraphs
« Reply #3 on: October 23, 2016, 04:22:41 AM »
I didn't understand very well what is the difference between "wxwugraphs.php" and "wugraphs.php". I've choosen to use the second one, because I don't use a particular template, but I use a self written php web page.
My weather Station in Rome:
http://www.romaeurmeteo.it/

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Problems with wugraphs
« Reply #4 on: October 23, 2016, 04:34:39 AM »
I didn't understand very well what is the difference between "wxwugraphs.php" and "wugraphs.php". I've choosen to use the second one, because I don't use a particular template, but I use a self written php web page.
You probably made a copying/typing error as some supporting javascripts  are missing from http://www.romaeurmeteo.it/wugraphs.php
This is my version:
Code: [Select]
<link type="text/css" href="./wxwugraphs/css/tabs.css" rel="stylesheet">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="./wxwugraphs/js/jq-core-widget-tabs.min.js"></script>
<script type="text/javascript">
Your version has:
Code: [Select]
<link type="text/css" href="./wxwugraphs/css/tabs.css" rel="stylesheet">
<script type="text/javascript">
It seems you set $loadJQuery in the settings file wxwugraphs/WUG-settings.php incorrect as this is the code in  wugrpahs.php who inserts those links:
Code: [Select]
if ($loadJQuery) {
echo '<script type="text/javascript" src="'.$jQueryFile.'"></script>';
echo '<script type="text/javascript" src="./wxwugraphs/js/jq-core-widget-tabs.min.js"></script>';
}

The graphs themselves are working OK, some examples:
http://www.romaeurmeteo.it/wxwugraphs/graphd1a.php
http://www.romaeurmeteo.it/wxwugraphs/graphd2a.php

Wim
« Last Edit: October 23, 2016, 04:44:40 AM by wvdkuil »

Offline sheldon

  • Senior Member
  • **
  • Posts: 93
    • Roma EUR Meteo
Re: Problems with wugraphs
« Reply #5 on: October 23, 2016, 05:44:48 AM »
Thank you wvdkuil! the page http://www.romaeurmeteo.it/wugraphs.php is correctly working, I had to set "yes" in "include jQuery" option on http://www.romaeurmeteo.it/wxwugraphs/configurator.php. But an other problem occurred: it seems that daily values are being correctly showed, but there are problems with monthly and yearly, as showed on the following screenshots:
 [ You are not allowed to view attachments ]
 [ You are not allowed to view attachments ]
My weather Station in Rome:
http://www.romaeurmeteo.it/

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Problems with wugraphs
« Reply #6 on: October 23, 2016, 07:38:25 AM »
Thank you wvdkuil! the page http://www.romaeurmeteo.it/wugraphs.php is correctly working, I had to set "yes" in "include jQuery" option on http://www.romaeurmeteo.it/wxwugraphs/configurator.php. But an other problem occurred: it seems that daily values are being correctly showed, but there are problems with monthly and yearly, as showed on the following screenshots:
. . . shortened . . .
Check the settings (WUG-settings.php) approx. line 256 (at least that is the line in my version). Your webserver has no multi-byte support.
Your line should look like this, set it to true:
Code: [Select]
$no_mb = false; // disable MB string support - only if you get some MB errors in WUG-test.phpWim
« Last Edit: October 23, 2016, 08:13:50 AM by wvdkuil »

Offline sheldon

  • Senior Member
  • **
  • Posts: 93
    • Roma EUR Meteo
Re: Problems with wugraphs
« Reply #7 on: October 23, 2016, 09:01:04 AM »
Thank you wvdkuil! the page http://www.romaeurmeteo.it/wugraphs.php is correctly working, I had to set "yes" in "include jQuery" option on http://www.romaeurmeteo.it/wxwugraphs/configurator.php. But an other problem occurred: it seems that daily values are being correctly showed, but there are problems with monthly and yearly, as showed on the following screenshots:
. . . shortened . . .
Check the settings (WUG-settings.php) approx. line 256 (at least that is the line in my version). Your webserver has no multi-byte support.
Your line should look like this, set it to true:
Code: [Select]
$no_mb = false; // disable MB string support - only if you get some MB errors in WUG-test.phpWim

I've set it to "true", but the problem is still there unvaried. This is a screenshot of my WUG-settings.php:
 [ You are not allowed to view attachments ]
My weather Station in Rome:
http://www.romaeurmeteo.it/

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Problems with wugraphs
« Reply #8 on: October 23, 2016, 10:45:36 AM »
. . . shortened . . .
I've set it to "true", but the problem is still there unvaried. This is a screenshot of my WUG-settings.php:
 [ You are not allowed to view attachments ]
Yes, the error is still there
Fatal error: Call to undefined function mb_strtoupper() in D:\inetpub\webs\romaeurmeteoit\wxwugraphs\WUG-inc-month.php on line 91
This are the problem lines (88-96)  in the script:
Code: [Select]
function my_mb_ucfirst($str, $e='utf-8') { // UTF-8 support
    global $no_mb;
    if (!$no_mb) {
    $fc = mb_strtoupper(mb_substr($str, 0, 1, $e), $e);
    return $fc.mb_substr($str, 1, mb_strlen($str, $e), $e);
    } else {
    return $str;
    }
}
Maybe there are two versions of WUG-settings.php as the setting of $no_mb can only be false to generate that error message.

http://www.romaeurmeteo.it/wxwugraphs/WUG-test.php  => asks for a password
Your WUG-settings.php are password protected so only you can check "how and why" this can happen.

Wim

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Problems with wugraphs
« Reply #9 on: October 23, 2016, 10:51:44 AM »
I maybe found another cause of this error,  please check lines 461-470 in WUG-settings.php
Code: [Select]
if (!function_exists('mb_stroupper')) {
  function mb_stroupper ($string) {
    global $no_mb;
    if ($no_mb) {
      return $string;
    } else {
      return stroupper($string);
    }
  }
}
change the line 462 from
Code: [Select]
  function mb_stroupper ($string) { to
Code: [Select]
  function mb_strtoupper ($string) {The function name has a missing t
But that is in my copy of WUG-settings.php, I can not check yours.

Wim

Offline sheldon

  • Senior Member
  • **
  • Posts: 93
    • Roma EUR Meteo
Re: Problems with wugraphs
« Reply #10 on: October 23, 2016, 02:35:59 PM »
Solved!
The problems, in WUG-settings.php, were:

- the missing t in the lines:

Code: [Select]
if (!function_exists('mb_strtoupper')) {
  function mb_strtoupper ($string) {
    global $no_mb;
    if ($no_mb) {
      return $string;
    } else {
      return strtoupper($string);
    }
  }
}

- the following missing lines that I've added to make it work:

Code: [Select]
if (!function_exists('mb_strlen')) {
  function mb_strlen ($string) {
    global $no_mb;
    if ($no_mb) {
      return $string;
    } else {
      return strlen($string);
    }
  }
}

Now it works great, I've inserted the wugraphs in my home page http://www.romaeurmeteo.it/

So, when you download the version 1.8.0 of wugraphs (which now is the latest) you have to correct these two little errors in the code to make it work.

Thank you Wim for helping me.
My weather Station in Rome:
http://www.romaeurmeteo.it/