我试图在共享的OVH服务器上使用Symfony2,KnpSnappyBundle,Wkhtmltopdf生成pdfs。
我已经在symfony的bin文件夹中输入了wkhtmltopdf二进制文件。
在\ app \ config \ _sodes.yml:
wkhtmlto.binary: %kernel.root_dir%/../bin/wkhtmltopdf
在\ app \ config \ config.yml:s
knp_snappy:
pdf:
enabled: true
binary: %wkhtmlto.binary%
options: []
在wkhtmltopdf上使用chmod 604,我发出了这条消息:
The exit status code '126' says something went wrong:
stderr: "sh: /home/procontakq/Configurateur/app/../bin/wkhtmltopdf:
Permission denied
"
stdout: ""
command: /home/procontakq/Configurateur/app/../bin/wkhtmltopdf --lowquality
'/tmp/knp_snappy59cbc7c736b541.46778125.html'
'/tmp/knp_snappy59cbc7c736c0f4.36952821.pdf'.
如果我将wkhtmltopdf二进制文件与715访问权限放在一起,我会收到以下错误消息:
在wkhtmltopdf上使用chmod 715,我发出了这条消息:
stderr: "sh: /home/procontakq/Configurateur/app/../bin/wkhtmltopdf: No such
file or directory
"
stdout: ""
command: /home/procontakq/Configurateur/app/../bin/wkhtmltopdf --lowquality
'/tmp/knp_snappy59cbc893b03971.22099815.html'
'/tmp/knp_snappy59cbc893b03c91.27932094.pdf'.