PHP exec() fails "cannot open display"
Hello everybody,
hope you can help me with this, I need this up & running like yesterday, but cannot figure it out.
OK, I need to put line charts on a web application that I made in PHP, using MySQL db. I created an app in RealBasic named Charter that makes a JPG image with the data I pass to it through a txt file. The idea is that my PHP script creates this text file, calls exec("Charter") to run my app, and then takes the resulting JPG and displays it. Charter works fine with the txt file created by my PHP script, but only if I run it manually. When the PHP script tries to run it, then nothing happens. To be correct, something happens: the following error is being dropped into the httpd error log "Charter - GTK-WARNING: cannot open the display".
I assume this happens because the user Apache (which tries to run my app Charter) does not have permissions to the X server.
How do I fix this?
|