Running "java -version" in BASH yields the correct result. However, when I try the same command using the shell_exec() command from a PHP script on apache, I get:
"Error occurred during initialization of VM Unable to load native library: libjava.jnilib"
I've tried all the usual fixes for this problem (changing symbolic links, unsetting env variables).
I'm also quite sure both BASH and the script are using the same binary. "which java" yields the same result.
Any thoughts on how I could get "java -version" to work?