Operating System & Version
CENTOS 6.10 virtuozzo [des]
cPanel & WHM Version
v86.0.17

Foodstuff

Member
Apr 7, 2019
5
1
3
Australia
cPanel Access Level
Root Administrator
Simply put: I have a php_pdflib.so file and a PHP installation managed by EasyApache4. I'd like to add the module to my php installation.

My understanding is that if I just throw the .so file onto the server and manually add it to the php.ini file, EasyApache4 will remove it the next time I change its configuration. (If I'm wrong about this let me know, 'cause it would save me a lot of time!)

So I need to add it to EA4 so I can use the EA4 interface to add it to my configuration. According to this and this I need to create a .rpm file and install it using yum but I cannot find any information about how to create a .rpm file for use with EA4.

How do I install my .so file?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
Hello,


Why not use the module installer which offers it? Those instructions are only for modules that aren't offered. pdflib 4.1.4 is available for PHP 5.6, 7.0, 7.1, 7.2, 7.3

You can install by going to WHM>>Software>>Module Installers -> PHP PECL -> Manage -> Select the PHP version you want to install for and click "Apply" then search for pdflib
 

Foodstuff

Member
Apr 7, 2019
5
1
3
Australia
cPanel Access Level
Root Administrator
Thank you for the suggestion.

Unfortunately that module;
  • Is no longer maintained
  • Only supports version 9.1 (the current version is 9.2)
  • Appears to be a direct binding to the C library
I have the up-to-date official PHP module at hand: I just need to know how to package it for use with EA4, because the documentation isn't very clear.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston

Foodstuff

Member
Apr 7, 2019
5
1
3
Australia
cPanel Access Level
Root Administrator
While the documentation you've suggested explains how to create an RPM, it doesn't explain how to create an RPM that works with EA4. There apparently was documentation to that effect, but that tutorial has been in the process of being "refined" for the past two years.

I've reverse engineered how the official packages are assembled and, following the instructions you suggested, created an RPM which, to the best of my knowledge, should work with EasyApache4.

When I run "rpm -Uvh ea-php72-pdflib-xyz.rpm --force" the EA4 interface says that the PDFlib extension is already "installed" without properly provisioning it through the EA4 interface. The module doesn't show up in phpinfo() either. "Uninstalling" it via the EA4 interface ends up removing it from the interface altogether. (I tried to install it with "yum localinstall ea-php72-pdflib-xyz.rpm" but that had the same effect.)

Where do I put my RPM file so it shows up in the list of provisionable modules?