i was trying to use the wkhtmltoimage on my site but is not working here is my code for the test site
<?php
$output = shell_exec('/usr/local/bin/wkhtmltoimage --quality 95 --width 1024 --height 0 yahoo.com test1.jpg');
echo "<pre>$output</pre>";
?>
the output is just a blank page. the funny thing is when i run the shell_exec(ls -l)
; instead of the
shell_exec('/usr/local/bin/wkhtmltoimage --quality 95 --width 1024 --height 0 yahoo.com test1.jpg');
, it works fine, when i run the wkhtmltoimage --quality 95 --width 1024 --height 0 yahoo.com test1.jpg
from my ssh terminal, it gives me
Loading page (1/2)
Rendering (2/2)
QPixmap: Cannot create a QPixmap when no GUI is being used ] 25%
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
Done
but it goes ahead and creats the jpg file.
when i try the same command for yahoo.com, this is what i get
catarplc@zenbile.com [~/public_html]# wkhtmltoimage --quality 95 --width 1024 --height 0 yahoo.com test100.jpg
Loading page (1/2)
Error: Failed loading page http://yahoo.com (sometimes it will work just to ignore this error with --load-error-handling ignore)
Error: Failed loading page http://yahoo.com (sometimes it will work just to ignore this error with --load-error-handling ignore)
different websites gives me different messages. does anyboody know what's going on? the guy i hired to do my site says it's a server problem and doesn't wanna do anything else, my webhosting company keep telling me the shell_exec() is working fine and wkhtmltoimage is installed properly.... i need help and both parties that i paid to help me are not helping me. can anybody outhere help please???
Thank you