LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-04-2006, 11:53 AM   #1
pppp
LQ Newbie
 
Registered: Apr 2006
Location: Hungary, EU
Distribution: Mandrake 10.1
Posts: 3

Rep: Reputation: 0
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?
 
Old 12-04-2006, 02:46 PM   #2
king111
Member
 
Registered: Jul 2005
Distribution: Debian, Ubuntu
Posts: 85

Rep: Reputation: 15
Add the user to the relevant group.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
No UTMPX entry, You must EXEC "login" for the lowest "shell" ooihc Solaris / OpenSolaris 7 03-12-2007 02:09 PM
Can't exec "firefox 1.5", "prompts glibc detected" SPo2 Linux - General 1 06-04-2006 11:02 PM
PHP / VideoLAN / Fedora Core Question - how can I get the PHP "exec" function to work gtrawoger Linux - Software 3 12-21-2005 06:51 AM
"cannot exec `as': ..." AND "C compiler cannot create ..." pr3st0 Linux - Software 0 10-15-2004 12:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration