PHP exec Java cmd failed with permission denied -


i writing php scripts need invoke jar. wrote test script test java -version cmd.

echo exec('whoami'); echo '<hr/>';  exec('java -version', $out); var_dump($out); 

the page return below:

apache array(6) { [0]=> string(134) "openjdk 64-bit server vm warning: info: os::commit_memory(0x00007ff705000000, 2555904, 1) failed; error='permission denied' (errno=13)" [1]=> string(1) "#" [2]=> string(76) "# there insufficient memory java runtime environment continue." [3]=> string(100) "# native memory allocation (malloc) failed allocate 2555904 bytes committing reserved memory." [4]=> string(57) "# error report file more information saved as:" [5]=> string(29) "# /tmp/jvm-26720/hs_error.log" } 

i have test cmd in console , normal.

[root@localhost ~]# java -version java version "1.7.0_45" openjdk runtime environment (rhel-2.4.3.3.el6-x86_64 u45-b15) openjdk 64-bit server vm (build 24.45-b08, mixed mode) 

is there can me this?

update: here hs_error.log enter image description here


Comments