我们已经更改了驻留的服务器,并且在驻留在新服务器之前,脚本工作得很好。但现在脚本产生错误
服务器: ubuntu PHP框架: CI
错误是:
Could not run command '/usr/bin/wkhtmltopdf' --margin-top '4' --margin-right '4' --margin-bottom '4' --margin-left '4' --page-size 'A4' /tmp/tmp_WkHtmlToPdf_hGfaVM.html /tmp/tmp_WkHtmlToPdf_wAkzvA: wkhtmltopdf: cannot connect to X server
发布于 2016-01-06 01:28:06
这实际上与Codeigniter无关,但与服务器的配置有关。(在服务器故障而不是Stackoverflow上问这个问题可能会有所帮助。)
1.)您应该确保xserver is installed and running (看起来不是)。
2.)正如mic所建议的--也可以看看this question。
希望这能有所帮助。祝好运!
https://stackoverflow.com/questions/34606791
复制相似问题