khtml2png2 works fine in the command line, but it could not be executed in php. my php script:
$command = '/usr/local/bin/khtml2png2 --display :0.0 http://google.com /tmp/google.png';
Any ideas? Any settings need to be done to enable php on a server level?
khtml2png requires a X server (because it relies on the kdelibs). So, you must be sure a X server is running and add the DISPLAY environment variable when invoking khtml2png.
Too enable khtml2png on a server, I strongly recommend khtmld (http://wiki.goatpr0n.de/projects/khtmld). The home page of this projects contains configuration example and some hints.