PHP library not being included, “Call to undefined function”-Collection of common programming errors

I am trying to use the PHP bindings (php-wkhtmltox) for wkhtmltopdf. The README said to install libwkhtmltox and then compile php-wkhtmltox, which I’ve done. I’ve also put the compiled .so file into my PHP extension directory, and I’ve adjusted both my Apache and CLI php.ini files to include the extension.

Now, after reloading and even restarting Apache and running one of the test scripts included with php-wkhtmltox, I get this:

Fatal error: Call to undefined function wkhtmltox_convert() in /path/to/test_pdf.php on line 3

Any ideas why this might be happening?

  1. Well hooray, I got it working!

    I’m not exactly sure what I did to make it work, but, it was quite possibly that ldconfig was producing the following:

    /sbin/ldconfig.real: /usr/local/lib/libxdiff.so.0 is not a symbolic link
    

    Once I cleared this issue up (created the symlink), re-ran ldconfig, and reloaded Apache, php-wkhtmltok showed up in the phpinfo() output.

Originally posted 2013-11-27 05:09:00.