PHP Call to undefined function PDFNet_Initialize

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.
https://stackoverflow.com/a/35442777/3761687