PHP Call to undefined function PDFNet_Initialize

14 views
Skip to first unread message

Ryan

unread,
Jan 18, 2021, 2:39:17 PM1/18/21
to PDFTron SDK
Question:
I have built the PHP language bindings with no errors, but when I run I get the following error.

Call to undefined function PDFNet_Initialize() ... in ../PDFNetWrappers/PDFNetC/Lib/PDFNetPHP_core.php:18707

Ubuntu 18.04

Answer:
It appears your PHP did not load the libPDFNetC.so shared library.

The fix is to `enable_dl = On` in your php.ini files, for example the two below.

/etc/php/7.2/cli/php.ini
/etc/php/7.2/apache/php.ini

You might also need to add the .so explicitly, or at least put the .so in a folder that PHP will load .so files from. See your PHP documentation.

Reply all
Reply to author
Forward
0 new messages