Using php.ini EZConfig in cPanel, add to the search path.
Original include path was ".:/usr/lib/php:/usr/local/lib/php"
Include path has been changed to ".:/usr/lib/php:/usr/local/lib/php:/home/ridgewat/php"

Alternate methods are to do this (which don't seem to work):
ini_set('include_path', ini_get('include_path') . ':/path/to/add'); or
set_include_path(get_include_path() . PATH_SEPARATOR . '/home/ridgewat/php');

Path being used:

/home/ridgewat/php:.:/opt/cpanel/ea-php82/root/usr/share/pear

This is an example of using PEAR to generate a barcode.
The called PEAR function returns a png image. Make sure when generating images, that there are is no whitespace before or after the php script tags.
The data passed to the script is 987654321 .

Barcode

 

This is an example of using PEAR to generate a graph.
Must add Graph package through cPanel first.  Dependancies may need to be installed by hand.

 

Graph