Op 1/8/10 1:41 PM, Rene Veerman schreef:
> I'm working on a better var_dump (http://mediabeez.ws/htmlMicroscope/,
> LGPL), and want to launch my kate editor when i click in the browser on a
> line in my trace-log.
> 
> I'm trying to exec() this line, but it returns 1 (which is i believe a
> general error)
> 
> echo "eeeehhh" | sudo -u rene -S /bin/sh -c "export HOME=/home/rene/ && kate
> -l 21 -u
> /media/500gb/data2/www/htdocs/naaah/maintenance/maintenanceLogic.php"
> 
> if i open a terminal, do
> 
> sudo su www-data
> 
> and then execute the line above,
> then kate actually jumps to the right file, or opens it, etc.
> 
> but from the browser, it won't work. exec($str,$o,$r); $r===1.
> i could use some help here..
>

seems everyone has the wrong idea about what your trying to do. it is possible,
given that your webserver and your browser are running on the machine - if the 
webserver
manages to start Kate up then you'll see the editor on your screen.

the only problem you *seem* to have is the fact that your webserver doesn't 
have the
ness. permissions to run the exec command (I'd guess it's specifically related 
to the fact
that the user apache runs as doesn't have the perms to run sudo, at least not 
in the context
of your user account) ... try fudging your sudoers file to give the user your 
apache instance
runs as the perms to run 'sudo kate' as you ... then restart apache (just in 
case) and see what
happens.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to