Hi, I am trying to run an R program ( linux ) from php to create a graph and other things for a webpage. The R program is stored in /tmp and to create a graph I use the png function i.e. png(filename = "/tmp/trialcsvt8wafB.png", width = 720, height = 480) But when the userid apache ( which is what the httpd runs as ) runs this I get the following error X connection to localhost:11.0 broken (explicit kill or server shutdown). and yet when I run it as a normal userid it works fine. Does anyone know how to fix this? Thanks, Bill