I have a problem. I have made a script to convert a given HTML page (url) to a given jpg file using html2image:
#!/bin/sh
cd /absolute/path/html2imagev3
LD_LIBRARY_PATH=.:/usr/lib:$LD_LIBRARY_PATH xvfb-run ./html2image $1 $2
It is then run like this:
/path/to/convert 'http://www.google.com' /tmp/google_screen.jpg
This works without problems. When I call this script using PHP, however,
system('./convert ' . $url . ' ' . $file);
I get this error:
Xlib: extension "RANDR" missing on display ":99.0".
current dir: /absolute/path/html2imagev3/libxpcom.so
Failed to get HOME
How can I fix this problem?
Edit: I have fixed it. Thanks for the help. By adding a HOME var to the convert script the program runs:
HOME=/tmp LD_LIBRARY_PATH= ...