Adding jpgraph to PHP with EasyApache installed

rolinger

Well-Known Member
Feb 13, 2017
45
3
58
Tampa
cPanel Access Level
Root Administrator
I could use some assistance here. I need to add `JpGraph` to my PHP installation. However with php-pfm it doesn't seem so straight forward and I am needing assistance.

Unfortunately there is no `composer` install for the most current version of JpGraph directly from `JpGraph - Most powerful PHP-driven charts` website which is forcing me to do a manual install. I have the gzip file on my server ready to go, but with these directions: Part I. Installing and verifying the configuring I am not certain how/where to add this library to my PHP version.

I think I found the source directory for all the EA PHP installs here: `/opt/cpanel` -> specifically `/opt/cpanel/ea-php73`

But the directory structure under `/opt/cpanel/ea-php73` is not what I was expecting so I don't know which path/sub-directory I need to copy the JpGraph files to.

The only directory in `ea-php73` is:

`/opt/cpanel/ea-php73/root`

And under that is all the following, which almost look like its a replication of the `/` directories:

`/opt/cpanel/ea-php73/root/bin`
`/opt/cpanel/ea-php73/root/boot`
`/opt/cpanel/ea-php73/root/dev`
`/opt/cpanel/ea-php73/root/etc`
`/opt/cpanel/ea-php73/root/home`
`/opt/cpanel/ea-php73/root/lib`
`/opt/cpanel/ea-php73/root/lib64`
`/opt/cpanel/ea-php73/root/media`
`/opt/cpanel/ea-php73/root/mnt`
`/opt/cpanel/ea-php73/root/opt`
`/opt/cpanel/ea-php73/root/proc`
`/opt/cpanel/ea-php73/root/root`
`/opt/cpanel/ea-php73/root/run`
`/opt/cpanel/ea-php73/root/sbin`
`/opt/cpanel/ea-php73/root/srv`
`/opt/cpanel/ea-php73/root/sys`
`/opt/cpanel/ea-php73/root/tmp`
`/opt/cpanel/ea-php73/root/usr`
`/opt/cpanel/ea-php73/root/var`

So I am def confused on where to install JpGraph at.
 
Last edited by a moderator:

rolinger

Well-Known Member
Feb 13, 2017
45
3
58
Tampa
cPanel Access Level
Root Administrator
I also created a thread in JpGraph's google forum for this same question: How to Install jpgraph on Linux cPanel with easyApache4?

I find it odd that there isn't a single reference, anywhere, on Google, Stackoverflow, cPanel - google searches turn up zip - on how to install JpGraph into a Linux cPanel easyApache system. I can't honestly be the first to ever do this (well, the first to do it that had issues worth of posting questions for help).
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,667
1,853
363
cPanel Access Level
Root Administrator
Hey there! While I haven't specifically tested this software, according to our documentation here:


the MultiPHP system will detect any non"ea-" named packages and allow you to use them.

If you check a PHP Info page, you'll see the "Scan this dir for additional .ini files" option which will show a path similar to /opt/cpanel/ea-php80/root/etc/php.d so that is where you'd want to place your custom .ini files. You should be able to see a list of these files in the "Additional .ini files parsed" section of the PHP Info page.

The actual extensions themselves are stored in /opt/cpanel/ea-php80/root/usr/include/php/ext/ in their respective directories.

I hope that information is useful!