{"id":1551,"date":"2022-08-30T15:17:28","date_gmt":"2022-08-30T15:17:28","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/27\/php-library-not-being-included-call-to-undefined-function-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:17:28","modified_gmt":"2022-08-30T15:17:28","slug":"php-library-not-being-included-call-to-undefined-function-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/php-library-not-being-included-call-to-undefined-function-collection-of-common-programming-errors\/","title":{"rendered":"PHP library not being included, &ldquo;Call to undefined function&rdquo;-Collection of common programming errors"},"content":{"rendered":"<p>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&#8217;ve done. I&#8217;ve also put the compiled .so file into my PHP extension directory, and I&#8217;ve adjusted both my Apache and CLI php.ini files to include the extension.<\/p>\n<p>Now, after reloading and even restarting Apache and running one of the test scripts included with php-wkhtmltox, I get this:<\/p>\n<pre><code>Fatal error: Call to undefined function wkhtmltox_convert() in \/path\/to\/test_pdf.php on line 3\n<\/code><\/pre>\n<p>Any ideas why this might be happening?<\/p>\n<ol>\n<li>\n<p>Well hooray, I got it working!<\/p>\n<p>I&#8217;m not exactly sure what I did to make it work, but, it was quite possibly that ldconfig was producing the following:<\/p>\n<pre><code>\/sbin\/ldconfig.real: \/usr\/local\/lib\/libxdiff.so.0 is not a symbolic link\n<\/code><\/pre>\n<p>Once I cleared this issue up (created the symlink), re-ran ldconfig, and reloaded Apache, php-wkhtmltok showed up in the phpinfo() output.<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-27 05:09:00. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>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&#8217;ve done. I&#8217;ve also put the compiled .so file into my PHP extension directory, and I&#8217;ve adjusted both my Apache and CLI php.ini files to include the extension. Now, after reloading and even [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1551","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1551"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1551\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}