EC-radar not working

Hi Ken, not to be a PITA but I have tried the ec-radar test file, but for the life of me I can’t get it to run on my website (ISP account). I have the ec-forecasts working, and looking at the php code, they both seem to use the same function calls, but for some reason, the script displays the cache file name, then seems to forget it when it does the fopen call on the file. The version of php reports back: PHP Version 4.4.8_pre20070816-pl0-gentoo , I hope that this version is okay with the script, seeing that the forecast script works like a charm. :? The only things not supported on the website server are:FreeType Support: NO T1Lib Support: NO JIS-mapped Japanese Font Support: NO. :? The syntax of PHP is a new one for me, last site I made had HTML frames (was a new thing at the time :wink:) so Ajax, Javascript and PHP are a whole new ballgame for me! :-k :-s

George

Sorry about your issue with ec-radar.php

Looking at the view-source for http://www.lara.on.ca/~gfodi/ec-radar.php shows

so there seems to be a problem writing the cache file and images for the cache.

I think you may have a bad specification for the $radarDir variable.

If you want to store the images and cache file in the same directory as your website it should read

$radarDir = '/~gfodi/';           // directory for storing radar-XXX-0.png to radar-XXX-6.png images

If you want to store them in a subdirectory named /radar then you should use

$radarDir = '/~gfodi/radar/';           // directory for storing radar-XXX-0.png to radar-XXX-6.png images

and make sure that the directory specified is writable by PHP.

Hope this helps…
Best regards,
Ken

Thanks Ken, tried it, here’s what it gave me back from the ‘ec-radar-cachetest.php’ script:

Test for ec-radar.php file cacheing and GD image function

Using /var/www/html/~gfodi/radar/ec-radar-en.txt as test file.

Now date=‘Tue, 03 Jun 2008 02:30:52’

Warning: fopen(/var/www/html/~gfodi/radar/ec-radar-en.txt) [function.fopen]: failed to open stream: No such file or directory in /home/gfodi/public_html/ec-radar-cachetest.php on line 75

Unable to open /var/www/html/~gfodi/radar/ec-radar-en.txt for write.

Warning: file(/var/www/html/~gfodi/radar/ec-radar-en.txt) [function.file]: failed to open stream: No such file or directory in /home/gfodi/public_html/ec-radar-cachetest.php on line 86

Warning: implode() [function.implode]: Bad arguments. in /home/gfodi/public_html/ec-radar-cachetest.php on line 86

File says=‘’

Read-back unsuccessful. contents different – ec-radar.php cache will not work correctly
PHP Version 4.4.8_pre20070816-pl0-gentoo

To run the ec-radar.php script, you also need GD enabled in PHP.
Make sure the following displays Yes for all items (except for ‘T1Lib Support’ and ‘JIS-mapped Japanese Font Support’ which are not needed).
Current GD status:

* GD support: YES
* GD Version: bundled (2.0.28 compatible)
* FreeType Support: NO
* T1Lib Support: NO
* GIF Read Support: YES
* GIF Create Support: YES
* JPG Support: YES
* PNG Support: YES
* WBMP Support: YES
* XBM Support: YES
* JIS-mapped Japanese Font Support: NO</blockquote>

I think I’m gonna be bald by the end of this! #-o

George

p.s.- I did CHMOD the /radar/ directory to 777 and it does exist on the website. ](*,) :combustion:

Ouch! That is a difficult one. I’ve got a fairly good head start (no pun intended) on the ‘bald’ thing :slight_smile: Hang on to what you have!

The “Unable to open /var/www/html/~gfodi/radar/ec-radar-en.txt for write.” means no ability of PHP to write the file. Please try permission of 755 for the directory /radar and run the test again.

Also, would you mind putting up a temporary php file ( and let me know the URL by PM) containing

<!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>Untitled Document</title>
</head>

<body>

<?php phpinfo(); ?>
</body>
</html>

so I can see what settings your PHP has?

We’ll find a solution for you! Hang in there…

Best regards,
Ken

Thanks for the link to the page with the info… there seems to be nothing ‘strange’ about the PHP installation on your webserver.

I see that you’re operating as a username on a webhoster’s server … I’d looked through the main/support pages on www.lara.on.ca and could find nothing specific about PHP support. So, I have a few questions for you:

  1. did you sign up for a webhosting account, or are you using the website just associated with your DSL internet access?
  2. do you plan on getting your own domain to associate with your account?

I see that your account does seem to have subdirectory support (as your ec-forecast.php icons are in the ec-icons/ directory and display correctly in the forecast). Have you changed your /radar directory back to 755 permission?

Would you upload a blank ec-radar-en.txt to your /radar/ directory and try ec-radar-testpage.php again?

Best regards,
Ken

Hi Ken,

as to:

1) did you sign up for a webhosting account, or are you using the website just associated with your DSL internet access?

no, didn’t want to drop the money on a “full blown” website yet, just using my account space at the moment.

2) do you plan on getting your own domain to associate with your account?

well, if I get everything looking “right” to my satisfaction, I might drop the $50 for the domain and $5/mth added to my bill, just can’t swing it right now.

I see that your account does seem to have subdirectory support (as your ec-forecast.php icons are in the ec-icons/ directory and display correctly in the forecast). Have you changed your /radar directory back to 755 permission?

Would you upload a blank ec-radar-en.txt to your /radar/ directory and try ec-radar-testpage.php again?

well I had a chat with a tech at the ISP offices, we looked over what is being reported back and found the gremlin! Seems that the pathname generation in the script was “going too deep” for the pathname and reporting back the path for the server! #-o The tech commented out the code and hard coded the correct path into the script, guess what, it worked!! :D/ :hello1:

So I did the same change in the ec-radar.php script and it now downloads and saves the images, but it still won’t display them. #-o ](*,)

I can download them with ftp to my computer and view them, but won’t display via the javascript viewer built into the script. :?

Gotta admit, getting more familiar with PHP now!! :lol:

George

George, I see you have 3 posts so are fairly new here. Welcome to the forum.

Just to let you know you can have your site hosted for quite a bit less than your numbers above. You can register a domain name through GoDaddy for about $10US per year and then an account with e-rice.net for another $10US/yr that will meet your needs for a hobby weather site. Just info.

–Dave

George,
I’m glad the hoster helped you find the correct real directory. Unfortunately, since your URL path doesn’t match the filesystem host path, you’ll need to make one more change in your ec-radar.php script … change

$imageDir = $radarDir;

to

$imageDir = '/~gfodi' . $radarDir;

and that should make it work for this userid/location on this webhoster – it would have to be reverted to the original code for a different webhoster.

This difficulty is really caused by the mismatch of the filesystem structure to the URL path structure on this particular hoster.

Best regards,
Ken

Hi Dave, thanks for the info! :hal :wink:

Ken, tried that fix, no joy. #-o

I took the plunge and got a domain name and signed up with e-rice, hope the transfer will go without a hitch. [-o< :thumbleft:

Will post a reply when I get everything moved and working. 8)

George

Cool! 8)

Don’t forget to replace your ec-radar.php script with a fresh copy … e-rice doesn’t have the same issues as your current hoster :slight_smile:

Best regards,
Ken

That was quick. If you have any problems just post here. You won’t the believe the knowledge base of people in this forum.

–Dave

Well it’s up! =D> :greenjumpers:

Still working a few bugs out, like why my header title wraps on IE6 but looks ok on Firefox. :?

Oh ya, Ken, forgot to chmod the /radar/ directory and it bit me in the ass!! #-o Tried the cache test and it spewed errors, then I remembered about the chmod! #-o

By the way Ken, any way of “recycling” the php code from ec-radar to snag the GEOS images from EC? [-o<

Other than the few oops’ it took me all of about 45 minutes to setup my DNS settings and get all the files transfered over from my ISP account to e-rice. Noticed one thing, much faster ftp response times on e-rice compared to my ISP. :?

Is there anywhere in the WD setup to speed up the clientraw upload interval, or is ~25 seconds/update the correct timing?

George

www.hamiltonweatheronline.net/index.php

Go Control Panel - Web File/Web Page/Real Time FTP/WDL - Real Time client ftp/… - Scroll box for Delay between uploading data (seconds). Change that to what you want.

–Dave

Hi Dave,

Go Control Panel - Web File/Web Page/Real Time FTP/WDL - Real Time client ftp/... - Scroll box for Delay between uploading data (seconds). Change that to what you want.

–Dave

figures I found that about 5 minutes before I read your post! #-o

cranked it down to 14 seconds, snappier updates now! :thumbleft:

thanks again :salute:

George