cloudy

Author Topic: Cloud Height Graphic v2.1  (Read 76918 times)

0 Members and 3 Guests are viewing this topic.

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 21,998
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: Cloud Height Graphic (released)
« Reply #210 on: May 12, 2009, 09:15:26 PM »
"O", "ESO", "SO", "SSO",

should be

"O", "OSO", "SO", "SSO",


Offline weatherbee

  • Posts: 547
  • Sherman, Ct.
    • http://www.shermanctweather.com
Re: Cloud Height Graphic (released)
« Reply #211 on: May 12, 2009, 09:21:02 PM »
Sorry, missed that one when I changed the code back.
Sony Pentium 4, 1.6 GHZ,512 MB Ram, Windows XP Pro, SP2

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 21,998
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: Cloud Height Graphic (released)
« Reply #212 on: May 12, 2009, 09:27:19 PM »
Thanks for fixing/posting the whole code section.

Offline Meerkat

  • Rainer
  • Posts: 695
  • WD v10.37Q b31, Win 7, HP 2 Core 4GB, 72hr UPS
  • Pretoria, South Africa
    • Bashewa
Re: Cloud Height Graphic (released)
« Reply #213 on: May 12, 2009, 11:37:48 PM »
Yes, there is, all the "=" in eg if ($translateTo='de') should be "=="

The effect of that error is that the first "if" has no condition so it defaults to true and the script uses the German directions, O for E is the only difference to English.

Thanks Nico. Well spotted.
As a Delphi programmer I make this mistake time and again.

I have made the correction ... grab code below (or in front).
« Last Edit: May 13, 2009, 12:50:12 AM by Meerkat »
Cheers,
Rainer

Meerkat's Script Collection
Script download links always available on the first page of my threads

Offline Meerkat

  • Rainer
  • Posts: 695
  • WD v10.37Q b31, Win 7, HP 2 Core 4GB, 72hr UPS
  • Pretoria, South Africa
    • Bashewa
Re: Cloud Height Graphic (released)
« Reply #214 on: May 12, 2009, 11:55:09 PM »
Hello again.
Well I have tried it even with one dot and without any dots too, and the result is the same :/ Strange?

http://www.meteokav.gr/cloud-base.php

The path for the images is working ok, and I have it like
but the path for the clientraw file is "dead".

Maybe I have to change Permissions on folders or ? I am confused.
Thanks again.

Hi John,
I see you're running PHP 4.4.2 ... ain't sure if that's got anything to do with your problem.
My development is done in PHP 5.2.6.

Try the following and see what errors you get:
1) at the very top of the script change this line:
       error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);
   ...to this...
       error_reporting(E_ALL);
2) at line number 537 change this:
       $file = @file($clientraw);
   ...to this...
       $file = file($clientraw);    // remove the "@"

Now run the code again and see what PHP errors you get.
It should now tell you what and where the error is.
Cheers,
Rainer

Meerkat's Script Collection
Script download links always available on the first page of my threads

Online JohnZ

  • Posts: 57
  • Greece, Kavala
    • Kavala's Weather Page
Re: Cloud Height Graphic (released)
« Reply #215 on: May 13, 2009, 12:51:06 PM »
Hm, many many errors  #-o

http://www.meteokav.gr/cloud-base.php

Quote
Notice: Undefined index: REMOTE_HOST in /var/www/vhosts/meteokav.gr/httpdocs/weather/Settings.php on line 35

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/vhosts/meteokav.gr/httpdocs/weather/Settings.php:35) in /var/www/vhosts/meteokav.gr/httpdocs/weather/include-style-switcher.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/meteokav.gr/httpdocs/weather/Settings.php:35) in /var/www/vhosts/meteokav.gr/httpdocs/weather/include-style-switcher.php on line 316

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/meteokav.gr/httpdocs/weather/Settings.php:35) in /var/www/vhosts/meteokav.gr/httpdocs/weather/include-style-switcher.php on line 316

Warning: file(): URL file-access is disabled in the server configuration in /var/www/vhosts/meteokav.gr/httpdocs/cloud-base.php on line 537

Warning: file(http://www.meteokav.gr/wdlive/clientraw.txt): failed to open stream: no suitable wrapper could be found in /var/www/vhosts/meteokav.gr/httpdocs/cloud-base.php on line 537

Warning: file(): URL file-access is disabled in the server configuration in /var/www/vhosts/meteokav.gr/httpdocs/cloud-base.php on line 537

Warning: file(http://www.meteokav.gr/wdlive/clientraw.txt): failed to open stream: no suitable wrapper could be found in /var/www/vhosts/meteokav.gr/httpdocs/cloud-base.php on line 537

Warning: file(): URL file-access is disabled in the server configuration in /var/www/vhosts/meteokav.gr/httpdocs/cloud-base.php on line 537

Warning: file(http://www.meteokav.gr/wdlive/clientraw.txt): failed to open stream: no suitable wrapper could be found in /var/www/vhosts/meteokav.gr/httpdocs/cloud-base.php on line 537

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/meteokav.gr/httpdocs/weather/Settings.php:35) in /var/www/vhosts/meteokav.gr/httpdocs/cloud-base.php on line 1311

Maybe my server can't give permission for the clientraw files ?

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 21,998
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: Cloud Height Graphic (released)
« Reply #216 on: May 13, 2009, 01:02:59 PM »
Don't panic. Just work the errors one by one from the top. Most likely the following errors are caused by the earlier ones.

First issue, what is on line 35 of settings.php?

Offline Meerkat

  • Rainer
  • Posts: 695
  • WD v10.37Q b31, Win 7, HP 2 Core 4GB, 72hr UPS
  • Pretoria, South Africa
    • Bashewa
Re: Cloud Height Graphic (released)
« Reply #217 on: May 13, 2009, 09:45:21 PM »
Hm, many many errors  #-o

http://www.meteokav.gr/cloud-base.php

Maybe my server can't give permission for the clientraw files ?

Hi John,
Look like it's a PHP configuration problem.
The errors that you should be concerned with are these 2 on line 537:
Code: [Select]
Warning: file(): URL file-access is disabled in the server configuration in /var/www/vhosts/meteokav.gr/httpdocs/cloud-base.php on line 537
Warning: file(http://www.meteokav.gr/wdlive/clientraw.txt): failed to open stream:
         no suitable wrapper could be found in /var/www/vhosts/meteokav.gr/httpdocs/cloud-base.php on line 537
This one is the culprit: URL file-access is disabled in the server configuration

According to the PHP manual:
allow_url_fopen boolean
This option enables the URL-aware fopen wrappers that enable accessing URL object like files.
Default wrappers are provided for the access of remote files using the ftp or http protocol, some extensions like zlib may register additional wrappers.
Note:
This setting can only be set in php.ini due to security reasons.

But then again you're not specifying a URL to open the clientraw.txt file.
Best is you upgrade to PHP 5 or replace the file() function with code using fopen(), fread() and fclose().
« Last Edit: May 13, 2009, 09:49:04 PM by Meerkat »
Cheers,
Rainer

Meerkat's Script Collection
Script download links always available on the first page of my threads

Offline lulu836

  • Linda
  • Posts: 2,232
  • Louisiana
    • Luv Retirement
Re: Cloud Height Graphic (released)
« Reply #218 on: May 14, 2009, 08:11:06 PM »
Since the dust has settled somewhat on this really cool script, I decided to take a stab at it.  I am getting the text but not the picture.  For some reason despite the code for the images being in the right place and the actual pngs being in the right place the script is trying to capture them from a totally different place.  Any hint as to what I'm doing incorrectly will be much appreciated.

I can go to the location shown below in a browser and the background appears fine.........trying to get it to accompany the text isn't happening.

You can also see that on the Properties page it is calling for jpeg instead of png.

Code:

   $pathToImages     = './wx/images/cb/';      // path to the background, cloud, windsock and scale images (with trailing slash)
   $pathToMoonImages = './wx/images/cb/moon/'; // path to the  moon phase images (with trailing slash)
« Last Edit: May 14, 2009, 08:28:01 PM by lulu836 »


Bashy

  • Guest
Re: Cloud Height Graphic (released)
« Reply #219 on: May 14, 2009, 08:57:46 PM »
you have to make the folder where that image should be writeable chmod 777

Offline lulu836

  • Linda
  • Posts: 2,232
  • Louisiana
    • Luv Retirement
Re: Cloud Height Graphic (released)
« Reply #220 on: May 14, 2009, 09:14:07 PM »
I've never had to do that on any other directory but I gave it a try.............still nothing. :(

They are already set to 777
« Last Edit: May 14, 2009, 09:18:45 PM by lulu836 »


Bashy

  • Guest
Re: Cloud Height Graphic (released)
« Reply #221 on: May 14, 2009, 09:22:05 PM »
mine is set ofr my main dir and the only way i could get it to work was to set it to 777
http://www.weather-watch.com/smf/index.php/topic,39180.msg323774.html#msg323774

Offline lulu836

  • Linda
  • Posts: 2,232
  • Louisiana
    • Luv Retirement
Re: Cloud Height Graphic (released)
« Reply #222 on: May 14, 2009, 09:29:43 PM »
Very strange...........I've been at this now for 3 years and I've never had any trouble at all.  The server will not allow that change just by choosing properties...........how did you change yours?


Bashy

  • Guest
Re: Cloud Height Graphic (released)
« Reply #223 on: May 14, 2009, 09:32:15 PM »
I just set it from my FTP program...
I can also do it with in my Direct Admin control panel  too

Offline lulu836

  • Linda
  • Posts: 2,232
  • Louisiana
    • Luv Retirement
Re: Cloud Height Graphic (released)
« Reply #224 on: May 14, 2009, 09:33:41 PM »
So you're running your own server.............right?


 

cumulus