WKHTMLTOPDF PHP Hostgator CentOS 6 x64

WKHTMLTOPDF PHP Hostgator CentOS 6 x64

我已经下载了最新的 wkhtmltopdf 副本,并将其放在我的 cgi-bin 文件夹中,该文件夹位于 hostgator 服务器上,该服务器为我提供了一个小型 Web 应用程序。我能够执行

/home/{user_name}/public_html/cgi-bin/usr/local/bin/wkhtmltopdf http://google.com /home/{user_name}/public_html/hello.pdf

这在 ssh 控制台上工作得很好。但是当我在 php 和

中尝试上述操作时
$cmd = "/home/{user_name}/public_html/cgi-bin/usr/local/bin/wkhtmltopdf http://google.com /home/{user_name}/public_html/hello.pdf 2>&1"; 
$t = exec ($cmd, $output); 
var_dump ($output);

我得到以下输出

array(2) { [0]=> string(19) "Loading pages (1/6)" [1]=> string(132) "[> ] 0% [======> ] 10%" }

这对我来说毫无意义。它必须是 php 配置或其他主机安全默认设置。请有人对此有所了解,我在这里撞墙了。

只是想 post 我根据问题的具体情况和相关帐户为自己找到的答案,在 posting 之日,我的评论是确实是答案

"I hate to be the bearer of bad news, but you will need to upgrade your account or do what I did and switch services to Digital Ocean, or another provider of your liking that will give you more control. Flat out php permission issue with a shared account or w.e. it was and hostgator support service IMHO is not very helpful what so ever. The men I spoke with new very little about what I would expect them to know at a basic technical level. So that was my solution unfortunately."

遇到此问题的任何其他人,我强烈建议您使用其他服务,您确实需要从共享帐户升级您的帐户。