[PHP] Re: Exec() wont run program
Curt Zirzow wrote: What is gedit? it looks like the gnu text editor command. most X applications wont run from the webserver in most cases. Curt, I'm trying to understand why most X applications wont run from the webserver in most cases. If nothing else, you should at least be able to run a shell script from php and have that execute other X applications to run on the webserver. To make things clear, the client initiates the execution of the applications (through php of course), but the applications are supposed to run on the webserver. Is there more information available somewhere that explains why most X applications wont run from the webserver? Thanks. Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Exec() wont run program
On Fri, 10 Oct 2003 13:24:49 -0700, Steve [EMAIL PROTECTED] wrote: I want to start up a program through a php page. For example, gedit. I found that the user is apache by running this: - passthru('whoami'); since apache might not have access to run a certain command, I'll use sudo. I edited the sudoers file in /etc/sudoers and underneath the line: # User privilege specification, I added: apache ALL=(ALL) NOPASSWD: ALL which would give apache access to run any command without a password. So in my php file the line looks like this: exec(sudo gedit); What is gedit? it looks like the gnu text editor command. most X applications wont run from the webserver in most cases. And it doesn't do anything. Any suggestions. echo shell_exec(sudo gedit); might give some answers, Curt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Exec() wont run program
Curt Zirzow wrote: What is gedit? it looks like the gnu text editor command. most X applications wont run from the webserver in most cases. gedit is a simple text editor - I think it stands for Gnome Edit echo shell_exec(sudo gedit); might give some answers, Curt. Tried echo shell_exec(sudo gedit); and still application doesn't run and no output is echoed to the web page. You said most X applications won't run from the webserver. Is there a way to get around that? Because I tried calling a custom shell script which opened those programs for me, which also didn't work. I've created a few applications in Kylix and I want to start them through a web browser using PHP. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Exec() wont run program
Where are you expecting gedit to appear? try with -display argument Also, try other commands, such as ls first. Mohamed~ On Fri, 2003-10-10 at 17:18, steve wrote: Curt Zirzow wrote: What is gedit? it looks like the gnu text editor command. most X applications wont run from the webserver in most cases. gedit is a simple text editor - I think it stands for Gnome Edit -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php