By my question, I'm sure most will recognize I'm not very experienced with linux, however, I'm stuck. Probably a simple knowledge gap.
I have a PHP application that is working well in my development environment on my windows machine (apache, mysql, php, java based reporting software called JasperReports).
I subscribed to a VPS service (from BlueHost.com) they do not support Java on their servers. I've installed jre1.8.0_51 on the VPS server, but am struggling with setting the environment variables.
The problem:
The java based reporting application doesn't run.
When I execute it from bash, it works, but from a PHP exec() call, it doesn't.
Troubleshooting:
When I echo $PATH & $JAVA_HOME from bash, I get the proper paths, but from a PHP exec() call, I get nothing for $JAVA_HOME and a different string for $PATH. I think this is the problem.
I was looking at the user that Apache runs under, and it appears to be 'nobody'. Is this the problem? I've tried to 'export' the correct $PATH and $JAVA_HOME statements in '/etc/environment' but no change.
Any help would be fantastic. Thanks
Ed
Advice on Java install
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: Advice on Java install
The CentOS supplied httpd does not run as nobody.
Are you running cPanel or some other control panel?
Are you running cPanel or some other control panel?
Re: Advice on Java install
Gerald,
I am working with a VPS machine provided by BlueHost.com. They do use cPanel. I've looked at /usr/local/apache/conf/httpd.conf and confirmed that User and Group are both "nobody".
Ed
I am working with a VPS machine provided by BlueHost.com. They do use cPanel. I've looked at /usr/local/apache/conf/httpd.conf and confirmed that User and Group are both "nobody".
Ed
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: Advice on Java install
CPanel replaces many of the CentOS programs with its own.
The whole web stack is non-CentOS, and any advice given here would likely break it more than it is now.
CPanel is a commercial product with paid support people.
You need to address all questions to cPanel support.
The whole web stack is non-CentOS, and any advice given here would likely break it more than it is now.
CPanel is a commercial product with paid support people.
You need to address all questions to cPanel support.