How to setup jpgraphs and wxgraphs

Setting a timezone on PHP requires PHP V5.1.0 as a minimum which would mean that these graphs would require that level of PHP.

To answer the other point it would be your station timezone which would be used and therefore it would not matter where the server was located or what timezone it worked on.

I guess the other point would be daylight saving as well.

I still think it would be best to ask Brian to add a field which represented perhaps just the hour value that the data represented. That would work universally and not require PHP V5.1.0 either.

Stuart

It certainly would be easier if there was a timestamp. I’m not sure how lulu’s graph is working at all, her server responds that it’s set to GMT so I would have thought that’s what the file time would be in.

One of the questions during domain set up pertains to what time zone you are in if that makes any difference. :dontknow:

As to servers I guess it may well be possible for them to be set to the users timezone, perhaps someone who knows could confirm this.

As to the mixed time styles 12 vs 24 hour format. All my graphs show in 24 hour format, but I run WD in 24hr mode. Any graphs which have time values (the 24 hour ones all have time stamps in the appropriate clientraw file) will show in whatever mode you run WD in, all the others are coded in 24 hour mode which was the way I coded it.

I probably think right now that the graphs need some cleaning up and sorting out a bit to perhaps externalise some more stuff to the config file. As to the timing of the last whole hour graphs I still would like Brian to consider adding a time stap of the hour the data represents which makes that part fireproof. The other time formats could then be externalised to the config file.

Right now I probably dont have the time to do this, I will consider it but it will be a while before it happens.

Stuart

I have been looking again at the graphs and thanks to Jim (aka jmcmurray) I now have two more graphs to add which contain a calculated dew point, they are last whole hour and 24 hour temperature+dewpoint+humidity graphs. I have also, again thats to Jim’s file, got a better way to find the hour being processed for the clientrawhour (last whole hour) graphs which does not rely on finding file modified times and does not worry about timezones etc. So the graphs will continue to work with both PHP4 and PHP5, at least for now. I will no longer test any graphs on PHP4 after the next update which will probably be out in the next week or so.

I would recommend people going to PHP5 if at all possible because PHP4 will no longer be enhanced after 31 Dec 2007 and no longer get critical security fixes after 08 August 2008. See www.php.net

Stuart

If the domain provider is not planning on using PHP5 I don’t think there’s any way an individual can make that happen is there?

I really cannot see any hosting provider worth being with not being able to at least install PHP5 along side PHP4 so folks can migrate by August this year, they have to understand that after August this year there will be no security holes patched in PHP4 and therefore leave themselves open to any problem. This is not new news, its was announced on 13th July 2007.

If my provider had not indicated that PHP5 was to be made available I’d email them demanding it. There is probably very little PHP4 code out there today which will not run under V5. I should point out that my provider has both available and the user can switch it over themselves.

Stuart

Interesting…I sent GoDaddy an email earlier today asking them about this…I should hear back soon. Anyway, if they should upgrade to PHP 5 can they also maintain PHP4 if they want to and/or how would a person with a websitesite indicate to them that the website was using code for 5 and not 4? I am not knowlegable about these things and am really interested in knowing. It’s a curiousity thing :oops:

It depends on how they install it but yes they can have and support both. My provider allows you to specify via an entry in the .htaccess file if you want PHP5, currently PHP4 is the default. It could also be done by them when you sign up or request either 4 or 5 to be your default at a later stage. In fact my provider will switch it for people who dont feel confident in doing it themselves.

Stuart

From the godaddy hosting features table, looks like you can have 4 or 5 (but how that’s determined is a good question):


godaddyphp.gif

From GoDaddy:

[color=green][b]"Support Staff Response
Dear Linda McElwee,
Thank you for contacting online support.

At this time you can upgrade to php5 through your Hosting Control Center or through your php.ini file"[/b][/color]

Looking at the FAQ it appears you may be able to run things under php5 by changing the suffix to that, so you could try test.php renamed test.php5 and see what it returns. If that works then it would be a way to test your scripts under 5 without switching over.

I had realised that I need to change the code which works out the times on the graphs so that it displays correctly when running WD in both 12 and 24 hour modes. In order to test this could someone who runs WD in 12 hour (ie AM/PM) mode please let me know (either here or in a PM) the whereabouts (URL) of their clientraw files that I might use for testing?

Stuart

PM sent

Thanks to both Jim and Linda for the PM’s, I can now test this…

Stuart

That seems to work. There’s gonna be a whole lot of file renaming going on I betcha.

That a good way to test compatibility with php 5, but once you switch to 5 using your hosting control or php.ini file then .php scripts will run under 5, you won’t need to change the names.

OK…even better :smiley:

On further investigation GoDaddy can handle both at the same time. If you want to use mixed extensions “php and php5” then all you hve to do is use php5 for those files and just plain php for php4 files.

I have just completed updating my graph page to reflect the 7 day graphs. I have been unable to get the temp_7days.php graph to work on my site…all others are fine.

http://www.i40exit319weather.com/wx11.html

Could someone provide me with some areas to check…at this point I can’t see the forest for the trees.

Thanks,
Ronnie

Ronnie,

If I just run the temp_7days.php graph on its own, by putting http://www.i40exit319weather.com/graphs/temp_7days.php into the address bar, i get the following error:

Warning: array_walk(): Unable to call NegVal() - function does not exist in /home/content/....../html/graphs/temp_7days.php on line 22

(I’ve removed part of the path for your security). So i expect there is an error around line 22 of the code, I had something similar but off the top of my head I can’t remember. I’ll haved a look & try to remember to get back.

Ian