Hello Gurus
I've been trying to let a php file call a shell script to run a jar file on Ubuntu and put an output on the screen or at least on a file but it doesn't seem to work at.
The script itself run from terminal does the work but not the php file.
here is the php file
$output=shell_exec('callablescript --import b57b06bb-36d8-de6c-0bf4-31e1a6a7d0db > runLogs/updater_run.log');
var_dump($output);
amd the callable script itself is has executable right and copied to /usr/bin/
#!/bin/bash
java -jar /home/orexec/callablejar.jar $1 $2 > runLogs/updater_run.log
i've read all sort of things on the as in add apacheuser to susdoers,or add this to it user ALL=NOPASSWD: /usr/bin/callablescript
and so on.
i don't know the kind of changes i'm making on my machine even though it's running on virtualbox, i just don't want to go further. so i'll like to ask you guys what you would do?
Has anyone succedded in this?
PS. i'm runningUbuntu 9.10
the php file is
under /var/www/or/test.php
type -a php= /usr/bin/php
which apache2= /usr/sbin/apache2