未包含 PHP 库,“调用未定义的函数”
我正在尝试对 wkhtmltopdf 使用 PHP 绑定 (php-wkhtmltox)。自述文件说安装 libwkhtmltox 然后编译 php-wkhtmltox,我已经这样做了。我还将编译后的 .so 文件放入 PHP 扩展目录中,并调整了 Apache 和 CLI php.ini 文件以包含该扩展。
现在,在重新加载甚至重新启动 Apache 并运行 php-wkhtmltox 中包含的测试脚本之一之后,我得到了以下
Fatal error: Call to undefined function wkhtmltox_convert() in /path/to/test_pdf.php on line 3
信息:您知道为什么会发生这种情况吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,万岁,我成功了!
我不太确定我做了什么才能让它工作,但是,很可能 ldconfig 产生了以下内容:
一旦我清除了这个问题(创建了符号链接),重新运行 ldconfig,并重新加载了 Apache,php- wkhtmltok 出现在 phpinfo() 输出中。
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:
Once I cleared this issue up (created the symlink), re-ran ldconfig, and reloaded Apache, php-wkhtmltok showed up in the phpinfo() output.