cloudy

Author Topic: MySQL -> JpGraph Interface  (Read 28715 times)

0 Members and 1 Guest are viewing this topic.

Offline JyriT

  • Posts: 3
    • http://weather.mustalaatikko.org/
Re: MySQL -> JpGraph Interface
« Reply #165 on: March 01, 2010, 07:07:01 AM »
Multiline-standalone-graphs are working nicely :)
Thanks again !

Offline bdtripps

  • Posts: 69
  • Youngtown, AZ
    • Agua Fria Ranch Youngtown, AZ
Re: MySQL -> JpGraph Interface
« Reply #166 on: March 01, 2010, 03:51:06 PM »
Hi,
Thank you very much for the of the script. Have the standalone-graphs running here http://southwestweather.com/wx/wxMySQL7daygraphs.php

Thanks
BTrip
B.Trip
Arizona
DavisVP2 w/ FARS, Weather Envoy Wireless
Internet connection cable
Win7, Intel Core i7 920, 9GB Ram,

Offline tstorm

  • Posts: 359
  • Harpers Ferry, WV
    • Meadowbrook Farm Weather
Re: MySQL -> JpGraph Interface
« Reply #167 on: March 14, 2010, 10:19:35 AM »
I have noticed that the times on my graphs are two hours behind even before the time change today.  The server which I used is located 2 times zones behind mine.  I have tried to use the following in the common_en.php and wxmultigraph.php file:

$ourTZ = "EST5EDT";
putenv("TZ=$ourTZ");

You can see the graphs at http://www.harpersferry-weather.com/wxmultigraph.php

Ideas on how to fix this issue?

Thanks,
John

Offline TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,859
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Re: MySQL -> JpGraph Interface
« Reply #168 on: March 14, 2010, 10:33:39 AM »
$ourTZ = "EST5EDT";
putenv("TZ=$ourTZ");

According to your web server, you are using PHP/5.2.11.  It is quite possible that your provider is blocking the use of putenv as a potential security hole.

Since PHP 5.1.0, the correct method of setting the timezone has changed.  The correct way would be to use the new date_default_timezone_set command like:

date_default_timezone_set('America/New_York');

With the list of proper zones listed on the page:  http://www.php.net/manual/en/timezones.php

This may or may not be your actual problem, but it is a good place to start.

All you need is Time, Aptitude and Desire ... and you can build just about anything...

Offline tstorm

  • Posts: 359
  • Harpers Ferry, WV
    • Meadowbrook Farm Weather
Re: MySQL -> JpGraph Interface
« Reply #169 on: March 14, 2010, 11:13:39 AM »
Using the date_default_timezone_set('America/New_York');  didn't work.  Graphs are still off by 2 hours

John

Offline TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,859
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Re: MySQL -> JpGraph Interface
« Reply #170 on: March 14, 2010, 11:24:08 AM »
Sorry... was a guess.

Don't use the scripts you are using so I am not familiar with them or how they work.

All you need is Time, Aptitude and Desire ... and you can build just about anything...

Offline tstorm

  • Posts: 359
  • Harpers Ferry, WV
    • Meadowbrook Farm Weather
Re: MySQL -> JpGraph Interface
« Reply #171 on: March 20, 2010, 12:42:10 PM »
Need help!  Still having problems with my graphs being two hours off.  The server which I use is two time zones behind me.  I have tried the date_default_timezone_set('America/New_York'); in the comm_en.php and also the multigraph.php files.  

http://www.harpersferry-weather.com/wxmultigraph.php

Thanks,

John

Edit: Got it figured out  :D .  I tried multiple approaches to take in account the 2 hour time difference between where I'm located and the host server (-2 hours).  In the end I needed to add the following to my php.ini file:

date.timezone = "America/New_York";

« Last Edit: March 20, 2010, 05:27:06 PM by tstorm »

Offline Herlev-DK

  • Posts: 132
  • Herlev, Denmark
    • Herlev vejret, Danmark
Re: MySQL -> JpGraph Interface
« Reply #172 on: May 20, 2010, 05:12:40 AM »
Hi

I have this great script up and running now  :D
Can anyone help me how I get all my old data into Mysql?
Testpage:
http://www.herlev-vejret.dk/wxmultigraf.php

Steffen
« Last Edit: May 20, 2010, 09:02:27 AM by Herlev-DK »
Best regards

Steffen, Denmark
info@herlev-vejret.dk
www.herlev-vejret.dk


Offline weatheroz

  • Brendan
  • Posts: 1,133
  • Logan Village, Queensland, Australia
    • Logan Village Weather
Re: MySQL -> JpGraph Interface
« Reply #173 on: May 20, 2010, 12:58:35 PM »

Can anyone help me how I get all my old data into Mysql?


That's something that I am trying to do myself, but have found a issue with getting the old data in to the mysql db.

Old data that I have been able to import from earlier this year is incomplete, with things such as monthly/yearly rain, UV, and many other things missing. :(


I have posted this info to Brian in this thread :-
http://www.weather-watch.com/smf/index.php/topic,38944.0.html

Unfortunately it appears that he hasn't been able to issue a fix for it just yet, but I'm sure it'll get sorted out at some stage. :)

Offline tstorm

  • Posts: 359
  • Harpers Ferry, WV
    • Meadowbrook Farm Weather
Re: MySQL -> JpGraph Interface
« Reply #174 on: July 16, 2010, 04:28:32 PM »
Has anyone converted the charts over to flash or Highcharts with a mouse over capability?

Offline kalli51

  • Posts: 1
  • South Norway
Re: MySQL -> JpGraph Interface
« Reply #175 on: August 14, 2010, 10:48:19 AM »
hi Krister, i try to using your Script ,i upload all to my website and if i try it comes this, use the link to view , http://ka-ra.org/webpages/multiwx_en.php   i got not a graph for the date what i select,may you have a idea what i did wrong .

best regards from Norway

Kalli 

watch  my Weatherstation  www.ka-ra.org
med vennlig hilsen fra norge

Offline kv-swe

  • Posts: 282
  • Sweden
    • Vädret i Hasslösa
Re: MySQL -> JpGraph Interface
« Reply #176 on: August 14, 2010, 07:03:21 PM »
Hi!
When i run http://ka-ra.org/multiwx/testfile.php it returns "getmysql error" so you need to check your settings in common_en.php so it matches your database.

 :) Krister

Offline tstorm

  • Posts: 359
  • Harpers Ferry, WV
    • Meadowbrook Farm Weather
Re: MySQL -> JpGraph Interface
« Reply #177 on: August 30, 2010, 11:49:17 PM »
For some reason the graph is not coming up anymore.  I have not touch a thing with the script. Any ideas?

http://www.harpersferry-weather.com/wxmultigraph.php

Thanks,

john


Offline linuxfreak

  • Posts: 229
  • Hey there.....
  • Hamilton, Ontario, Canada
    • Hamilton Central Mountain Weather
Re: MySQL -> JpGraph Interface
« Reply #178 on: August 30, 2010, 11:58:53 PM »
John, looks like no data after August 24th.


George
Davis VP2/FARS, Intel Atom N330 dual-core, 2Gig ram, Windows XP Home SP3 

Offline gabba

  • Posts: 155
  • Paris (at the) Hilton
  • Lower Hutt, New Zealand
    • Maungaraki, Lower Hutt, NZ -  Weather
Re: MySQL -> JpGraph Interface
« Reply #179 on: February 05, 2011, 09:47:44 PM »
Hi!
When i run http://ka-ra.org/multiwx/testfile.php it returns "getmysql error" so you need to check your settings in common_en.php so it matches your database.

 :) Krister

Hi Krister
That's the error message I'm getting as well. I've checked the SQL database connection settings at least 5 or 6 times. I've tried resetting passwords, user permissions on the database etc., but essentially it's set up the same way as it is in WD, and WD connects and publishes the data okay to the database. JP graph appears to be set up and working okay (passes the Jpgraph install tests).Is there anything else I'm missing here?

http://www.huttweather.co.nz/jpgraph/multiwx/multigraph.php

I do have "localhost" for the $host variable, but if I change that to "huttweather.co.nz" then I get "unable to connect". Working through the get_data.php script I can see that using localhost gets me further down the script - so I'm sticking with localhost at this point. I'm not entirely sure why it would make that much of a difference - so there maybe is something in that, but I can't think why (hoster also recommendeds using localhost).

Any thoughts? (maybe something blindingly obvious?)

Cheers

 

cumulus