Introduction
The pdflib module is not distributed as an rpm and must be manually compiled to be installed. Please note that this PECL module has only added support up to PHP 7. PHP 8 is incompatible, and there is no maintainer to add support for PHP 8.
Please note that cPanel cannot directly support compiling and installing custom software. The instructions below serve as a guide, but you may need to contact a System Administrator if you require more detailed assistance.
Procedure
- First, the pdflib libraries need to be downloaded, compiled, and installed. As the server's root user, nagivate to the /usr/local/src directory and download the libraries:
cd /usr/local/src; wget https://fossies.org/linux/misc/old/PDFlib-Lite-7.0.5p3.tar.gz
- Decompress the downloaded file and enter the resulting directory:
tar xvfz PDFlib-Lite-7.0.5p3.tar.gz; cd PDFlib-Lite-7.0.5p3/
- The following command will compile the library from the source code:
./configure && make && make install
- We can use PECL to begin the installation of the plugin to your preferred version of PHP. The example below uses PHP 7.4:
/opt/cpanel/ea-php74/root/usr/bin/pecl install pdflib
- During the installation, you will be prompted for the path to the pdflib installation. Enter the path to the /usr/local directory:
path to pdflib installation? : /usr/local
- The system should confirm the installation was successful:
Build process completed successfully
Installing '/opt/cpanel/ea-php74/root/usr/lib64/php/modules/pdf.so'
install ok: channel://pecl.php.net/pdflib-4.1.4
Extension pdflib enabled in php.ini - Please Note: If you are running a CloudLinux server with cagefs, you must update cagefs:
cagefsctl --force-update
- Finally, restart the webserver to finalize the installation:
/scripts/restartsrv_httpd --hard
Comments
0 comments
Article is closed for comments.