Jump to content

I want to run tomcat's startup.sh with php exec().


linguafranca

Recommended Posts

Hi!

 

I should mention that I'm horrible at php. I did my googling, and asked somebody before coming here though. Anyhow, I'm stuck, and I need help.

 

I'd like to run Tomcat's '/bin/startup.sh' startup script with php (BTW, Tomcat - a java "server"; it is run by executing the forementioned script). When I write:

 echo exec('MY_PATH/tomcat6/bin/startup.sh'); 

I get the response that "At least one of these environment variable is needed to run this program" which looks like the last line of tomcat's common error message:

Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program

 

When I run:

 echo exec('export JRE_HOME=MY_PRECIOUS_PATH');

it neither helps nor returns anything.

 

Is it possible to set an environment variable for www-data account with php?

Thanks in advance!

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.