I am new to linux and connecting web pages to the server.
I am working on a project which requires a html page to execute a java file in Linux server and display the output back in a webpage.
Everything is successful when I execute the php file from command line in linux, it displays test print comments in both java and shell script, it creates a file from both java code and shell code.
But when i execute from browser
Issue #1 - it doesn't create files from shell script but it displays the test print statements
Issue #2 - it doesn't execute java code at all so no file creation nor prints statements.
Could you tell me if i have to enable or change settings if i am executing these shell and java code from browser??
I have set the permissions of public_html to 777 for time being.
Error From browser:Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00007fcf589ac000, 2555904, 1) failed; error='Permission denied' (errno=13) # # There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (malloc) failed to allocate 2555904 bytes for committing reserved memory. # An error report file with more information is saved as: # /tmp/hs_err_pid306.log
If you are using Centos there may be some issues with selinux.
The command to disable selinux is "setenforce 0" from the linux command prompt.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With