khtml2png2

trbailey
trbailey's picture

Joined: 2007-04-16
Posts: 172
Posted: Mon, 2008-06-09 06:14

Here's hoping someone can help me with this rather odd permission issue.

I've installed the latest khtml2png and it works fine from the command line using --display :0.0 as an additional parameter. I have an Xsession running on display :0.0 as the webserver user. I can execute the khtml2png2 command successfully from an X console but I can't get it to work under Gallery2.

Any suggestions would be nice...

Debug Listing:

Quote:
Executing: (nice "/usr/local/bin/khtml2png2" "--display" ":0.0"
"--width" "1024" "--height" "768"
"http://en-us.www.mozilla.com/en-US/firefox/central/"
"/var/wdata/FamilyGalleryData/tmp/lnk_NqnaNt.jpg" )
2>"/var/wdata/FamilyGalleryData/tmp/g2dbgShXlHf"
getParameter exec.expectedStatus for core plugin
file_exists(/var/wdata/FamilyGalleryData/tmp/g2dbgShXlHf)
filesize(/var/wdata/FamilyGalleryData/tmp/g2dbgShXlHf)
fopen(/var/wdata/FamilyGalleryData/tmp/g2dbgShXlHf, r, 0)
feof(Resource id #2983)
fgets(Resource id #2983, 4096)
feof(Resource id #2983)
fgets(Resource id #2983, 4096)
feof(Resource id #2983)
fgets(Resource id #2983, 4096)
feof(Resource id #2983)
fgets(Resource id #2983, 4096)
feof(Resource id #2983)
fgets(Resource id #2983, 4096)
feof(Resource id #2983)
fclose(Resource id #2983)
unlink(/var/wdata/FamilyGalleryData/tmp/g2dbgShXlHf)
Regular Output:
Error Output:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
khtml2png2: cannot connect to X server :0.0
Status: 1 (expected 0)

I tried running xhost +local:www-data but when I run a Build All from site admin it causes khtml2png to crash in the Xsession when it hits the link items and hangs up the webserver. The X session error is a dcop or intercommunications error.

As a security precaution I set the webserver itself to deny requests for any "dot" files but other than than the X session has the same permissions as the webserver so I can't understand why it fails.

I can run #khtml2png2 --display :0.0 ...etc from an SSH console as the webserver user and it works fine but it won't run from the webserver.

I suspect it's a PHP permission issue...
Any thoughts?

Author:Blog|Site