Newbie Install Question

97 views
Skip to first unread message

Bob Barracca

unread,
May 18, 2023, 1:52:21 PM5/18/23
to JpGraph
Greetings, I am brand new to JpGraph and to PHP.  I seem to be having some trouble immediately with the installation.  I followed the instructions here: https://jpgraph.net/download/manuals/chunkhtml/ch03s03.html but they reference 2.5, whereas I installed 4.4.1.  After unzipping the the files to /usr/share/php (not /usr/shar/php) i see the "jpgraph-4.4.1" folder and created my link.  But the library files are not contained directly in the jpgraph-4.4.1 folder, they are in a subfolder called "src".

So if I try to:
require_once('jpgraph/jpgraph.php');

this fails with 
Fatal error: require_once(): Failed opening required 'jpgraph/jpgraph.php' (include_path='.:/usr/share/pear:/usr/share/php')

So instead I tried to use:
 require_once('jpgraph/src/jpgraph.php');

And that allows me to proceed, but the library does not work.  I am trying to run a very simple example and it seems to fail to create the "$graph" object:
require_once('jpgraph/src/jpgraph.php');

$graph = new Graph();
$graph->SetScale('intint');

Results in:
Fatal error: Uncaught Error: Call to a member function SetScale() on null

I deleted a bunch of rows from "docs" and "examples" to make this easier to read, but my /usr/share/php folder contents are listed out below.

It seems I am missing something obvious.  Any help would be appreciated.

Thanks,
Bob

-----
/usr/share/php/
├── jpgraph -> /usr/share/php/jpgraph-4.4.1
├── jpgraph-4.4.1
│   ├── VERSION
│   ├── docs
│   │   ├── chunkhtml
│   │   │   ├── admon-bug.png
...
│   │   │   ├── index.html
│   │   │   └── projinfo.html
│   │   ├── index.html
│   │   ├── jpgraph_logo.jpg
│   │   ├── manual.png
│   │   └── reference.png
│   └── src
│       ├── Examples
│       │   ├── accbarex1.php
│       │   ├── accbarframeex01.php
...
│       │   ├── y2synch2.php
│       │   └── yearssn.txt
│       ├── README
│       ├── barcode
│       │   ├── demoapp
│       │   │   ├── barcode_image.php
│       │   │   ├── barcode_menu.php
│       │   │   └── index.html
│       │   ├── examples
│       │   │   ├── barcode_errhandling_ex0.php
│       │   │   ├── barcode_ex0.php
│       │   │   ├── barcode_ex1.php
│       │   │   ├── barcode_ex2.php
│       │   │   ├── barcode_ex3.php
│       │   │   ├── barcode_ex4.php
│       │   │   └── barcode_usps_example.php
│       │   └── mkbarcode.php
│       ├── flag_mapping
│       ├── flags.dat
│       ├── flags_thumb100x100.dat
│       ├── flags_thumb35x35.dat
│       ├── flags_thumb60x60.dat
│       ├── fonts
│       │   ├── DejaVuSans-Bold.ttf
│       │   ├── DejaVuSans-BoldOblique.ttf
│       │   ├── DejaVuSans-Oblique.ttf
│       │   ├── DejaVuSans.ttf
│       │   ├── FF_FONT0-Bold.gdf
│       │   ├── FF_FONT0.gdf
│       │   ├── FF_FONT1-Bold.gdf
│       │   ├── FF_FONT1.gdf
│       │   ├── FF_FONT2-Bold.gdf
│       │   └── FF_FONT2.gdf
│       ├── gd_image.inc.php
│       ├── html
│       ├── imageSmoothArc.php
│       ├── imgdata_balls.inc.php
│       ├── imgdata_bevels.inc.php
│       ├── imgdata_diamonds.inc.php
│       ├── imgdata_pushpins.inc.php
│       ├── imgdata_squares.inc.php
│       ├── imgdata_stars.inc.php
│       ├── jpg-config.inc.php
│       ├── jpgraph.php
│       ├── jpgraph_antispam-digits.php
│       ├── jpgraph_antispam.php
│       ├── jpgraph_bar.php
│       ├── jpgraph_canvas.php
│       ├── jpgraph_canvtools.php
│       ├── jpgraph_contour.php
│       ├── jpgraph_date.php
│       ├── jpgraph_errhandler.inc.php
│       ├── jpgraph_error.php
│       ├── jpgraph_flags.php
│       ├── jpgraph_gantt.php
│       ├── jpgraph_gb2312.php
│       ├── jpgraph_gradient.php
│       ├── jpgraph_iconplot.php
│       ├── jpgraph_imgtrans.php
│       ├── jpgraph_led.php
│       ├── jpgraph_legend.inc.php
│       ├── jpgraph_line.php
│       ├── jpgraph_log.php
│       ├── jpgraph_meshinterpolate.inc.php
│       ├── jpgraph_mgraph.php
│       ├── jpgraph_pie.php
│       ├── jpgraph_pie3d.php
│       ├── jpgraph_plotband.php
│       ├── jpgraph_plotline.php
│       ├── jpgraph_plotmark.inc.php
│       ├── jpgraph_polar.php
│       ├── jpgraph_radar.php
│       ├── jpgraph_regstat.php
│       ├── jpgraph_rgb.inc.php
│       ├── jpgraph_scatter.php
│       ├── jpgraph_stock.php
│       ├── jpgraph_table.php
│       ├── jpgraph_text.inc.php
│       ├── jpgraph_theme.inc.php
│       ├── jpgraph_ttf.inc.php
│       ├── jpgraph_utils.inc.php
│       ├── jpgraph_windrose.php
│       ├── lang
│       │   ├── de.inc.php
│       │   ├── en.inc.php
│       │   └── prod.inc.php
│       └── themes
│           ├── AquaTheme.class.php
│           ├── GreenTheme.class.php
│           ├── OceanTheme.class.php
│           ├── OrangeTheme.class.php
│           ├── PastelTheme.class.php
│           ├── RoseTheme.class.php
│           ├── SoftyTheme.class.php
│           ├── UniversalTheme.class.php
│           └── VividTheme.class.php


17 directories, 2447 files



Reply all
Reply to author
Forward
0 new messages