Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

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

Legacy Cumulus 1 release 1.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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Noob PHP Problems

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

Moderator: daj

Post Reply
Krumlov
Posts: 16
Joined: Wed 23 Mar 2011 11:58 am
Weather Station: WH2081
Operating System: Windows XP SP3
Location: Brisbane, Australia

Noob PHP Problems

Post by Krumlov »

Hi Guys,

Am interested in getting some historical data on my website and my reading tells me I need some add ons specifically JPGRAPH. So I have gone through all the installation documents but the PHP files don't work properly.

If you look here you will see PHP5 and GD should all be working: http://users.on.net/~gavin_n/weather/info.php

But if I try this nothing happens: http://users.on.net/~gavin_n/weather/cu ... ource=view

And if I try this no images appear: http://users.on.net/~gavin_n/weather/jp ... stsuit.php

Any ideas? :?:
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Noob PHP Problems

Post by steve »

Krumlov wrote:But if I try this nothing happens: http://users.on.net/~gavin_n/weather/cu ... ource=view
That link works fine for me - it displays the contents of the cumuluswebtags.php file and shows that it's being processed and uploaded correctly.
And if I try this no images appear: http://users.on.net/~gavin_n/weather/jp ... stsuit.php
That gives me a 404 - not found, so it's not a PHP problem, the file simply doesn't exist. Is that a file that you're supposed to upload yourself? I'm afraid I'm not really familiar with what you're trying to do so I'm not a lot of help! I'm sure someone who has done this already will be along soon...
Steve
Krumlov
Posts: 16
Joined: Wed 23 Mar 2011 11:58 am
Weather Station: WH2081
Operating System: Windows XP SP3
Location: Brisbane, Australia

Re: Noob PHP Problems

Post by Krumlov »

Firstly as for the cumuluswebtags file perhaps it is a browser issue then. I just get:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD>
<BODY><PRE></PRE></BODY></HTML>


I have since moved things around by reading all the documentation but it still doesn't work. It looks to me that all of the examples are using a relative path to all the PHP files so nothing can be found. The files are now here so can you try again: http://www.users.on.net/~gavin_n/jpgrap ... stsuit.php
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: Noob PHP Problems

Post by beteljuice »

The graphs themselves are failing because you haven't any fonts installed.
Image
......................Imagine, what you will KNOW tomorrow !
Krumlov
Posts: 16
Joined: Wed 23 Mar 2011 11:58 am
Weather Station: WH2081
Operating System: Windows XP SP3
Location: Brisbane, Australia

Re: Noob PHP Problems

Post by Krumlov »

beteljuice wrote:The graphs themselves are failing because you haven't any fonts installed.
Actually the fonts are installed but I think the webserver can't find the data because it isn't looking where everything is installed. I have this on my ISPs website and I don't have control over the php.ini file that the documentation is talking about where the PATHs are defined. Has anyone else installed this stuff?
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: Noob PHP Problems

Post by beteljuice »

Your datafile and the graph call are working.

eg. Part of acbarex1.php

<?php // content="text/plain; charset=utf-8"

require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_bar.php');

$data1y=array(-8,8,9,3,5,6);
$data2y=array(18,2,1,7,5,4);


// Create the graph. These two calls are always required
$graph = new Graph(500,400);
$graph->SetScale("textlin");

.......

but the graph generation is failing because ......

Warning:
imageloadfont(/webspace/users.on.net/data/T8/42/T842581/jpgraph/Examples/jpgraph/fonts/FF_FONT0.gdf)
function.imageloadfont: failed to open stream: No such file or directory in /webspace/users.on.net/data/T8/42/T842581/jpgraph/Examples/jpgraph/gd_image.inc.php on line 91

and similar warnings for other fonts. through to line 95
Image
......................Imagine, what you will KNOW tomorrow !
Krumlov
Posts: 16
Joined: Wed 23 Mar 2011 11:58 am
Weather Station: WH2081
Operating System: Windows XP SP3
Location: Brisbane, Australia

Re: Noob PHP Problems

Post by Krumlov »

beteljuice wrote: .......

but the graph generation is failing because ......

Warning:
imageloadfont(/webspace/users.on.net/data/T8/42/T842581/jpgraph/Examples/jpgraph/fonts/FF_FONT0.gdf)
function.imageloadfont: failed to open stream: No such file or directory in /webspace/users.on.net/data/T8/42/T842581/jpgraph/Examples/jpgraph/gd_image.inc.php on line 91

and similar warnings for other fonts. through to line 95
Yep that is because all of the jpgraph files are in "my" root level. So jpgraph.php is in /webspace/users.on.net/data/T8/42/T842581/jpgraph/ and the fonts are in /webspace/users.on.net/data/T8/42/T842581/jpgraph/fonts

Each of the examples seem to be using a relative path. That is, jpgraph/fonts which from the Examples directory translates to .../Examples/jpgraph/fonts

If I copy one of the examples to "my" root then it works (I think) http://users.on.net/~gavin_n/ganttmonthyearex1.php


I am just trying to work out what others have done to get this to work because I can't be alone here. Can I? :shock:
Post Reply