Author Topic: Weather-Display Carterlake-style AJAX/PHP website templates available  (Read 62213 times)

0 Members and 1 Guest are viewing this topic.

Offline BfdWx

  • WxElement panel
  • Senior Contributor
  • *****
  • Posts: 255
    • Branford Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #25 on: April 06, 2008, 06:58:09 PM »
Quote
I did this.

Does your FTP log show that the files are being uploaded? So far it is still old data on your site.....maybe it has not cycled yet?

Offline mchallis

  • Member
  • *
  • Posts: 45
    • Long Beach, WA Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #26 on: April 06, 2008, 06:58:29 PM »
Your thermometer script is throwing an error loading the PNG right where imagecreatefrompng is called.
It could be related to your PHP configuration.
Here is a new line of error diagnostic code you can put in it.

inside thermometer.php


Change
Code: [Select]
if( ! function_exists("gd_info")){
  die("Sorry.. this script requires the GD library in PHP to function.");
}

to

Code: [Select]
if( ! function_exists("gd_info")){
  die("Sorry.. this script requires the GD library in PHP to function.");
}
if( ! function_exists("imagecreatefrompng")){
  die("Sorry.. this script requires the GD library compiled with PNG support in PHP to function.");
}

Then I can see if that was the cause or not.


Offline prvrt

  • Contributor
  • ***
  • Posts: 128
  • WL7COQ
    • My Idaho Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #27 on: April 06, 2008, 07:01:35 PM »
Your thermometer script is throwing an error loading the PNG right where imagecreatefrompng is called.
It could be related to your PHP configuration.
Here is a new line of error diagnostic code you can put in it.

inside thermometer.php


Change
Code: [Select]
if( ! function_exists("gd_info")){
  die("Sorry.. this script requires the GD library in PHP to function.");
}

to

Code: [Select]
if( ! function_exists("gd_info")){
  die("Sorry.. this script requires the GD library in PHP to function.");
}
if( ! function_exists("imagecreatefrompng")){
  die("Sorry.. this script requires the GD library compiled with PNG support in PHP to function.");
}

Then I can see if that was the cause or not.



Changed and uploaded.
Davis Instruments 6163-Wireless VantagePro2 Plus w/wireless Anemometer, Software = Weather Display
Blackfoot, Idaho

Offline mchallis

  • Member
  • *
  • Posts: 45
    • Long Beach, WA Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #28 on: April 06, 2008, 07:07:19 PM »
There could be a permissions problem or something, I am not sure yet.
what is your server type? IIS or Apache?
what version of PHP?

You might try "Testing to see if PHP is available on your website" on this page:
http://saratoga-weather.org/scripts.php

You have to install the test file, then ..

The results should tell if your php has all the correct image libraries enabled.
http://saratoga-weather.org/test.php

Offline prvrt

  • Contributor
  • ***
  • Posts: 128
  • WL7COQ
    • My Idaho Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #29 on: April 06, 2008, 07:14:20 PM »
There could be a permissions problem or something, I am not sure yet.
what is your server type? IIS or Apache?
what version of PHP?

You might try "Testing to see if PHP is available on your website" on this page:
http://saratoga-weather.org/scripts.php

You have to install the test file, then ..

The results should tell if your php has all the correct image libraries enabled.
http://saratoga-weather.org/test.php

Test.php is loaded on my server for you to see. It does work. Go-Daddy is my host, they use IIS 6.0., PHP version 4.3.11
Davis Instruments 6163-Wireless VantagePro2 Plus w/wireless Anemometer, Software = Weather Display
Blackfoot, Idaho

Offline mchallis

  • Member
  • *
  • Posts: 45
    • Long Beach, WA Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #30 on: April 06, 2008, 07:21:28 PM »
There could be a permissions problem or something, I am not sure yet.
what is your server type? IIS or Apache?
what version of PHP?

You might try "Testing to see if PHP is available on your website" on this page:
http://saratoga-weather.org/scripts.php

You have to install the test file, then ..

The results should tell if your php has all the correct image libraries enabled.
http://saratoga-weather.org/test.php

Test.php is loaded on my server for you to see. It does work. Go-Daddy is my host, they use IIS 6.0., PHP version 4.3.11

It must be some permissions problem then.
You are also having a problem with the forecast page and permissions. If you vie the source of that page it gives you hints in the comments

<!-- unable to write cache file forecast.txt -->

That means you PHP does not have permission to create and write to files.
Tip: If you get a PHP error about file permissions,
try changing the forecast.txt file permissions to 755, or on some servers 777
on some servers you have to create a blank forecast.txt and then change the permissions
http://www.stadtaus.com/en/tutorials/chmod-ftp-file-permissions.php


Offline prvrt

  • Contributor
  • ***
  • Posts: 128
  • WL7COQ
    • My Idaho Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #31 on: April 06, 2008, 07:31:26 PM »
There was no forecast.txt on the server, so I created a blank. It has full permission.
Davis Instruments 6163-Wireless VantagePro2 Plus w/wireless Anemometer, Software = Weather Display
Blackfoot, Idaho

Offline mchallis

  • Member
  • *
  • Posts: 45
    • Long Beach, WA Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #32 on: April 06, 2008, 07:41:47 PM »
There was no forecast.txt on the server, so I created a blank. It has full permission.

fsockopen is a network command used by the script to fetch the forecast URL, then cache it.
You are having a problem with fsockopen not working on ISS.
I am running out of help for ISS issues, I only use Apache, sorry.


Offline prvrt

  • Contributor
  • ***
  • Posts: 128
  • WL7COQ
    • My Idaho Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #33 on: April 06, 2008, 07:43:24 PM »
There was no forecast.txt on the server, so I created a blank. It has full permission.

fsockopen is a network command used by the script to fetch the forecast URL, then cache it.
You are having a problem with fsockopen not working on ISS.
I am running out of help for ISS issues, I only use Apache, sorry.



Its just my luck. I appreciate the help. Maybe someone else will figure this out.
Davis Instruments 6163-Wireless VantagePro2 Plus w/wireless Anemometer, Software = Weather Display
Blackfoot, Idaho

Offline BfdWx

  • WxElement panel
  • Senior Contributor
  • *****
  • Posts: 255
    • Branford Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #34 on: April 06, 2008, 07:46:32 PM »
Quote
I am running out of help for ISS issues, I only use Apache, sorry.

I had MAJOR issues with IIS which Ken was able to get me through, I recently switched to GoDaddy/e-rice and have no problems. Stick with this though, at least until Ken has a chance to look this over.

Jack

Offline prvrt

  • Contributor
  • ***
  • Posts: 128
  • WL7COQ
    • My Idaho Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #35 on: April 06, 2008, 07:50:27 PM »
I plan on working through this. I still can't get the testtags.php to update with the correct info. Hopefully I can figure it out. I think this may be some of the problem.
Davis Instruments 6163-Wireless VantagePro2 Plus w/wireless Anemometer, Software = Weather Display
Blackfoot, Idaho

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9244
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #36 on: April 06, 2008, 08:05:33 PM »
Sorry to be a bit late to reply.. been out and about with our guests from Denmark.

It looks like your server is not allowing outbound connections with fsockopen, but it doesn't say why (the
Code: [Select]
<!-- Network error:  () --> in the pages that use the function (forecast, advisory, earthquake, etc) all complain the same.

Would you mind putting up a .php page with just
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>PHP Info</title>
</head>
<body>
<?php phpinfo(); ?>
</body>
</html>
in it.  Call the page anything you like, just make sure it has .php as the extension, then send me the URL on your site and I can take a look at the settings for PHP.

Couple of questions about your IIS host:
1) is this a commercial webhoster or are you running the server yourself?
2) if a commercial hoster, is it possible (and financially feasible) to switch to a Linux/Apache service?
  (over 80% of websites are Linux/Apache .. IIS is only for the diehard Micro$oftians :-) )

The updating of testtags.php (and trends-inc.html) is by Weather-Display.  You should use this setup to get those files uploading:

copy the testtags.txt and trends-inc.txt to your c:\wdisplay\webfiles directory.

Use the Weather-Display Control Panel,
Web Files/Web Page/Real Time FTP/WDL,
Custom Web Page Setup TAB

In the 'Special file conversion' area

put:  trends-inc.txt     in local file 1
      trends-inc.html    in Remote file name 1

      testtags.txt       in Local File 2
      testtags.php       in Remote file name 2

Turn the switch to ON

Press Test

Press OK to save the settings.



Best regards,
Ken
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 BfdWx

  • WxElement panel
  • Senior Contributor
  • *****
  • Posts: 255
    • Branford Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #37 on: April 06, 2008, 08:08:20 PM »
testtags appears to be ok now!

Jack

Offline prvrt

  • Contributor
  • ***
  • Posts: 128
  • WL7COQ
    • My Idaho Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #38 on: April 06, 2008, 08:10:11 PM »
He is the the link to the file you wanted uploaded. http://myidahoweather.com/test1.php This is a commercial host Go-Daddy.com.

As far as the testtags.php, for some reason it was updating locally, but not to the server.
Davis Instruments 6163-Wireless VantagePro2 Plus w/wireless Anemometer, Software = Weather Display
Blackfoot, Idaho

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9244
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #39 on: April 06, 2008, 08:19:25 PM »
Thanks...

Here's the problem:  Your hoster has the following functions DISABLED

disable_functions   getmyinode, getopt, getrusage, extension_loaded, dl, mysql_pconnect, crack_check, crack_closedict, crack_getlastmessage, crack_opendict, fsockopen, pfsockopen,  mysql_list_dbs, mysql_stat, ini_get, ini_get_all, ini_alter, ini_set, get_current_user, get_defined_constants, get_include_path,  php_ini_scanned_files, php_uname, phpcredits, restore_include_path, set_include_path, set_time_limit, version_compare, zend_version, getmypid, getmyuid, getmygid, assert_options, assert, fopen, fwrite, fread, file, fpassthru, file, mail, opendir, readdir, closedir

This is quite nasty on their part, as the template website needs:
fsockopen
fopen
fread
fwrite
file

in multiple scripts.

Try this:
Create a file named php.ini in the document root of your website.  Put in the file:
Code: [Select]
disable_functions = "";
safe_mode = off;
and upload it to your website.  We'll see if we can override the default setting to get back the functions we need.

Best regards,
Ken
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 prvrt

  • Contributor
  • ***
  • Posts: 128
  • WL7COQ
    • My Idaho Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #40 on: April 06, 2008, 08:22:44 PM »
Created and uploaded.
Davis Instruments 6163-Wireless VantagePro2 Plus w/wireless Anemometer, Software = Weather Display
Blackfoot, Idaho

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9244
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #41 on: April 06, 2008, 08:24:21 PM »
Including the (hastily added)

safe_mode = off;

?

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 prvrt

  • Contributor
  • ***
  • Posts: 128
  • WL7COQ
    • My Idaho Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #42 on: April 06, 2008, 08:27:31 PM »
Including the (hastily added)

safe_mode = off;

?



It is now.
Davis Instruments 6163-Wireless VantagePro2 Plus w/wireless Anemometer, Software = Weather Display
Blackfoot, Idaho

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9244
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #43 on: April 06, 2008, 08:33:33 PM »
And... It's not having any effect, so GoDaddy's IIS service is 'locked down'.  As it is locked, you only have two recourses:

1) call their tech support and say "I need to be able to turn off safe_mode and use the functions fsockopen, fread, fclose and file"  can that be done on the IIS service?

if they say 'no', then ask them question (2)

2) can I be moved to a Linux/Apache service that doesn't force me to use safe_mode with PHP and does allow those functions?

If they say 'no', then tell them 'Hasta la vista' and move your domain to a webhoster that does.

Sorry, but if they refuse to allow rational PHP usage, then they don't deserve your business.
I can suggest e-rice.net, icdsoft, 1and1, lunarpages as hosters that are rational and the scripts work fine on them.

Best regards,
Ken
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 prvrt

  • Contributor
  • ***
  • Posts: 128
  • WL7COQ
    • My Idaho Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #44 on: April 06, 2008, 08:35:34 PM »
Thanks for your help. I will call and see what they say. I hope they are willing to work with me.

Edit: Sent them an Email to see what they say. If I remember right, when I signed up, they had the choice of Windows or Linux. I just went with windows thinking it was the way to go since I use windows. Seems that may have been a bad choice, but at least I am learning. I don't think it should be a problem switching.

EDIT: I got snooping around on Go-Daddy and it seems all I had to do was go to my account and switch my platform OS. It should be switched over in a few hours.
« Last Edit: April 06, 2008, 09:42:15 PM by prvrt »
Davis Instruments 6163-Wireless VantagePro2 Plus w/wireless Anemometer, Software = Weather Display
Blackfoot, Idaho

Offline prvrt

  • Contributor
  • ***
  • Posts: 128
  • WL7COQ
    • My Idaho Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #45 on: April 06, 2008, 09:55:12 PM »
WOOOOOOOT!!!!!  \:D/ Seems IIS was the problem. Linux works fine. Site is up and running! Thanks for all you help guys.
Davis Instruments 6163-Wireless VantagePro2 Plus w/wireless Anemometer, Software = Weather Display
Blackfoot, Idaho

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9244
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #46 on: April 06, 2008, 10:37:22 PM »
Excellent!  Congratulations!

I've added your site to the list of WD/AJAX/PHP template sites.

Best regards,
Ken
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 BfdWx

  • WxElement panel
  • Senior Contributor
  • *****
  • Posts: 255
    • Branford Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #47 on: April 06, 2008, 11:28:20 PM »
prvrt

Excellent, I'm glad it worked out for you. Without Ken I would have never figured all that out or even how to do it!!! Hopefully this whole thread will help somebody else in the same situation. I have to think that others have done the same as you when they signed up.

Jack

ps...nice job as always Ken!

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9244
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #48 on: April 07, 2008, 12:46:38 AM »
Whew!  That IIS (and it's foibles) will be the death of me yet  :lol:

Sometimes you just have to see what phpinfo(); says is available.  The Microsoft IIS hosting was primarily for ASP.Net functions, and the PHP appeared to be a (much crippled) afterthought.  The killer was it wouldn't listen to what was in the php.ini file, so there was no hope of getting it to work with that particular implementation (IIS/PHP).

I'm really glad that prvrt had an easy time switching to the Linux hosting platform, so he's not out any $$$ trolling for a new hoster.

Moral:  Unless you're planning on using .asp pages, avoid the Microsoft/IIS/PHP servers and stick with Linux/Apache/PHP (like most of the world).. you'll thank yourself for not encountering the strange IIS/PHP foibles :-)

Best regards,
Ken
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 prvrt

  • Contributor
  • ***
  • Posts: 128
  • WL7COQ
    • My Idaho Weather
Re: Weather-Display Carterlake-style AJAX/PHP website templates available
« Reply #49 on: April 07, 2008, 10:29:32 PM »
I now have a couple more questions.

1. How do I use the fly out menu. I do have it set to true in "settings", but not sure how to make it work in "menubar". I would like to add some external links from my "Web Cameras" menu to other cams in the area.

2. On the radar page when I zoom out to the last 2 settings, the red dot that shows the town moves from Idaho where it should be, to the west coast. Shows the coast of Oregon on the 2nd zoom out, all the way out shows around San Fransico. Is that possible to fix?

Other than that, things seem to be working great. Thanks again for all your help.
Davis Instruments 6163-Wireless VantagePro2 Plus w/wireless Anemometer, Software = Weather Display
Blackfoot, Idaho