I'm using the command:
shell_exec("java -version");
to detect what Java version is installed. Java IS installed. The PHP script runs under the user "daemon". Running this command from the command line:
su daemon -c 'java -version'
outputs
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.1) (6b27-1.12.1-2ubuntu0.12.04.2)
OpenJDK Client VM (build 20.0-b12, mixed mode, sharing)
I know using shell_exec works with Java and PHP because elsewhere in the code I'm running java .jar files using it.
Am I missing something here?