Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Cumulus PHP-GD Banner

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

mm23
Posts: 152
Joined: Mon 03 Feb 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

Re: Cumulus PHP-GD Banner

Post by mm23 »

Sure Steve.....but Now I see that if I put a banner php at the same foldre as realtime.text It works perfectly, but if I put a banner php file into the separeat folder and if I write path It doesn't work

http://www.sibenikusrcu.com/test2/banner.php

My realtime.text file is in /public_html/weather

error log:

[20-Feb-2014 19:13:01 UTC] PHP Warning: fopen(/public_html/weatherrealtime.txt): failed to open stream: No such file or directory in /home/sibeniku/public_html/test2/banner.php on line 336
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 98 in /home/sibeniku/public_html/test2/banner.php on line 178
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 1 in /home/sibeniku/public_html/test2/banner.php on line 184
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 38 in /home/sibeniku/public_html/test2/banner.php on line 531
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 39 in /home/sibeniku/public_html/test2/banner.php on line 531
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 2 in /home/sibeniku/public_html/test2/banner.php on line 531
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 14 in /home/sibeniku/public_html/test2/banner.php on line 531
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 3 in /home/sibeniku/public_html/test2/banner.php on line 531
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 4 in /home/sibeniku/public_html/test2/banner.php on line 531
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 14 in /home/sibeniku/public_html/test2/banner.php on line 531
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 11 in /home/sibeniku/public_html/test2/banner.php on line 531
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 5 in /home/sibeniku/public_html/test2/banner.php on line 531
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 13 in /home/sibeniku/public_html/test2/banner.php on line 531
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 6 in /home/sibeniku/public_html/test2/banner.php on line 531
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 13 in /home/sibeniku/public_html/test2/banner.php on line 531
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 9 in /home/sibeniku/public_html/test2/banner.php on line 531
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 9 in /home/sibeniku/public_html/test2/banner.php on line 531
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 16 in /home/sibeniku/public_html/test2/banner.php on line 531
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 10 in /home/sibeniku/public_html/test2/banner.php on line 531
[20-Feb-2014 19:13:01 UTC] PHP Notice: Undefined offset: 15 in /home/sibeniku/public_html/test2/banner.php on line 531
Image
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus PHP-GD Banner

Post by steve »

You've put

$SITE['hloc'] = "/public_html/weather";

rather than the setting I suggested.
Steve
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus PHP-GD Banner

Post by steve »

Actually, you probably should have a trailing 'slash':

$SITE['hloc'] = "../weather/";
Steve
mm23
Posts: 152
Joined: Mon 03 Feb 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

Re: Cumulus PHP-GD Banner

Post by mm23 »

Yes. I ve got that all the time:

############################################################################
# CONFIGURATION INFORMATION
############################################################################
$SITE['version'] = "3.0";
$SITE['hloc'] = "/public_html/weather";
$SITE['datafile'] = "realtime.txt";
$SITE['image_width'] = 468;
$SITE['image_height'] = 60;
#---------------------------------------------------------------------------
$SITE['fontdir'] = "fonts/"; # must contain ttf font files!
$SITE['usettf'] = "no"; # Set to No to use default fonts
#---------------------------------------------------------------------------
$SITE['format'] = "png"; # Options: jpeg gif png
$SITE['dateiso'] = "no";
$SITE['sitename'] = "www.sibenikusrcu.com";
#---------------------------------------------------------------------------
// Current field names (matches tag fields) used
$SITE['cvalues'] = array(
"date","time","temp","hum","dew","wspeed","wgust","avgbearing","rrate",
"rfall","press","wdir","beaufort","windunit","tempunit","pressunit","rainunit",
"windrun","presstrend","rmonth","ryear","rfallY","intemp","inhum","wchill",
"temptrendval","tempTH","TtempTH","tempTL","TtempTL",
"windTM","TwindTM","wgustTM","TwgustTM",
"pressTH","TpressTH","pressTL","TpressTL",
"cversion","cbuild");
############################################################################
Image
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus PHP-GD Banner

Post by steve »

But does this not work?

$SITE['hloc'] = "../weather/";
Steve
mm23
Posts: 152
Joined: Mon 03 Feb 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

Re: Cumulus PHP-GD Banner

Post by mm23 »

No :( . ..But It works if the banner php is in the same folder as realtime txt....strange..................... :?:
Image
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Cumulus PHP-GD Banner

Post by beteljuice »

You still have:

Code: Select all

$SITE['hloc']           = "/public_html/weather/";
It should be:

Code: Select all

$SITE['hloc']           = "../weather/";
OR perhaps:

Code: Select all

$SITE['hloc']           = "/weather/";
Last edited by beteljuice on Thu 20 Feb 2014 10:38 pm, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !
mm23
Posts: 152
Joined: Mon 03 Feb 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

Re: Cumulus PHP-GD Banner

Post by mm23 »

:clap: :clap: :clap:

Man can live and learn

Thanks Steve
Image
mm23
Posts: 152
Joined: Mon 03 Feb 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

Re: Cumulus PHP-GD Banner

Post by mm23 »

One question:

Why could not have been: /public_html/weather instead of ../weather/
Image
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus PHP-GD Banner

Post by steve »

That starts with a slash, so it's not a relative path, so it needs to be the full path, and on your server the full path would be /home/sibeniku/public_html/weather/
Steve
mm23
Posts: 152
Joined: Mon 03 Feb 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

Re: Cumulus PHP-GD Banner

Post by mm23 »

ok.........many thanks
Image
User avatar
salineweather
Posts: 5
Joined: Sun 23 Nov 2014 4:04 pm
Weather Station: Davis VP2 Pro
Operating System: Windows 7
Location: Benton, AR

Re: Cumulus PHP-GD Banner

Post by salineweather »

Hi Folks,

Merry Christmas!!!! Evidently I am having a brain fart in terms of getting my banner to show. I am using the script that Kevin (TNET) has kindly made for us, and I have it producing the banner correctly here, but it will not show in my signature no matter what I try. This is the code I have currently:

Image

Everything I've read, remember, says this should work, but........

It may be time to step away from the computer for a while. I'm sure it's something simple (famous last words).

Thanks in advance,

John
Image
Saline Weather on Twitter
Blitzortung Station: 1387 Benton, AR
CWOP: D2073, GR2AE, GR3, PWS/weatherforyou.com, CoCoRaHS: AR-SL-23
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus PHP-GD Banner

Post by steve »

You've put 'banner.png' and it should be 'banner.php'.
Steve
duke

Re: Cumulus PHP-GD Banner

Post by duke »

steve wrote:You've put 'banner.png' and it should be 'banner.php'.
Don't you ever have a day off Steve? Merry Xmas.
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus PHP-GD Banner

Post by steve »

duke wrote:Don't you ever have a day off Steve?
"We never close" :)

I may not be around quite so much on New Year's Eve.
Steve
Post Reply