carpatic Power User

Joined: 04 May 2005 Posts: 80
|
Posted: Thu Jun 08, 2006 3:45 am Post subject: [solved]Control OO from php: start/stop server |
|
|
I have a web application that uses OpenOffice for document converting. I am starting OO as server and connect to it when I need to do a conversion. It all works fine, but I need to be able to control OO from the browser also, to be able to start and stop it when required just by accessing some php pages.
I am on FC2. First, I've made a system service, so I can start/stop OO just by running "service openOffice start", "service openOffice stop". I've created 2 shell scriots, start00.sh, stopoo.sh, which calls the service start and stop and I can start and stop OO from php, executing those shells (using popen, system, etc.)
OO starts and stops just fine,but when I try to connect to it it gives me NoConnectException: Connector : couldn't connect to socket
It seems that OO starting this way does not allow me to connect to it, but it all works fine if I just run the startoo.sh shell script, without calling it from php.
In both cases (calling from php or directly from the prompt) OO is shown in the system processes list in exactely the same way.
I believe is a problem of process ownership, but I could not figure how to solve it
Last edited by carpatic on Thu Jun 08, 2006 6:53 am; edited 1 time in total |
|