I have a website that was developed in 2012 in Symfony 2.4 by Yann, a developer who created about 70% of the site and myself who has been developing on it since about 2013-2014
Our site was originally hosted by Yann and everything worked well. Until the moment he started to stop paying his server, which caused us many site crashes.
So he was asked to migrate to OVH in 2016, we took a web plesk solution for this purpose. And since we migrated we lost a feature, the generation of PDFs.
And no way to make it work again since.
Here’s the error we got :
The exit status code '127' says something went wrong:
stderr: “sh: /vendor/wkhtmltopdf/bin: No such file or directory
”
stdout: “”
command: /vendor/wkhtmltopdf/bin –lowquality ‘/tmp/knp_snappy5b55e3aa348db3.85109382.html’ ‘/tmp/knp_snappy5b55e3aa349b42.36987656.pdf’.
Here’s my config.yml :
knp_snappy:
pdf:
enabled: true
binary: /vendor/wkhtmltopdf/bin
options: []
image:
enabled: true
binary: /vendor/wkhtmltoimage/bin
options: []
And i have a folder named /vendor/wkhtmltopdf/bin as this screenshot proves it :
So i dunno what to do …
2
Answers
I just changed for adding binary names like that :
And i got the same error :
stderr: "sh: /vendor/wkhtmltopdf/bin/wkhtmltopdf: No such file or directory " stdout: "" command: /vendor/wkhtmltopdf/bin/wkhtmltopdf --lowquality '/tmp/knp_snappy5b5ef7bd7b0378.87600401.html' '/tmp/knp_snappy5b5ef7bd7b1028.75774701.pdf'.
according to snappy docs, the config.yml needs to point to actual binary, not to just bin folder. please add the binary names in the config.yml and it should all be OK