pdflib extension

Questions about hosting a Website, using MySQL, PhP or MariaDB may be posted here.
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:

https://account.synology.com/support/su ... p?lang=enu



2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
SynM
I'm New!
I'm New!
Posts: 4
Joined: Mon Apr 23, 2018 10:29 pm

pdflib extension

Unread post by SynM » Wed May 16, 2018 4:34 pm

Hi,

does anyone know how to install the php_pdflib extension?

I found an old post here: https://forum.synology.com/enu/viewtopic.php?t=88118
But that doesn't work.
I downloaded PDFlib-9.1.2p1-Linux-x86_64-php.tar.gz and need to use the right .so file from one of the bind/php directories in there.
In putty I could only find 'extension=' lines in

Code: Select all

vi /etc/php/php.ini
so I added

Code: Select all

extension = php_pdflib.so
I found 3 locations for putting the extension in Synology.
1. php 7.0.28
phpini = /usr/local/etc/php70/php.ini
extension dir = /usr/local/lib/php70/modules
I copied

Code: Select all

cp /volume1/web/PDFlib-9.1.2p1-Linux-x86_64-php/bind/php/php-700/php_pdflib.so /usr/local/lib/php70/modules/php_pdflib.so
2. php 5.6.11
phpini = /etc/php/php.ini
extension dir = /usr/lib/php/modules/
I copied

Code: Select all

/volume1/web/PDFlib-9.1.2p1-Linux-x86_64-php/bind/php/php-560/php_pdflib.so /usr/lib/php/modules/php_pdflib.so
3. php 5.6.34
phpini = /usr/local/etc/php56/php.ini
extension dir = /usr/local/lib/php56/modules
I copied

Code: Select all

/volume1/web/PDFlib-9.1.2p1-Linux-x86_64-php/bind/php/php-560/php_pdflib.so /usr/local/lib/php56/modules/php_pdflib.so
Anyone know how to get it working?

SynM
I'm New!
I'm New!
Posts: 4
Joined: Mon Apr 23, 2018 10:29 pm

Re: pdflib extension

Unread post by SynM » Wed May 16, 2018 9:35 pm

I found my own solution.
I should have used the non thread safe files from pdflib. Now phpinfo shows the pdf lib loaded (and so is print_r(get_loaded_extensions());). So the commands are:

Code: Select all

sudo cp /volume1/web/PDFlib-9.1.2p1-Linux-x86_64-php/bind/php/php-700-nts/php_pdflib.so /usr/local/lib/php70/modules/php_pdflib.so
sudo cp /volume1/web/PDFlib-9.1.2p1-Linux-x86_64-php/bind/php/php-560-nts/php_pdflib.so /usr/lib/php/modules/php_pdflib.so
sudo cp /volume1/web/PDFlib-9.1.2p1-Linux-x86_64-php/bind/php/php-560-nts/php_pdflib.so /usr/local/lib/php56/modules/php_pdflib.so

Post Reply

Return to “Web Server + PHP / MySQL + MariaDB”