Hi there,
i wrote an OpenOffice macro that i call from the following shell script when running Linux in console mode ie not with a GUI. If i call this shell from the terminal, the macro runs fine. I've installed an Xvfb server (note "-display :1.0") that has allowed me to do this.
Code for shell:
#!/bin/bash
/opt/OpenOffice.org1.1.4/program/soffice -display :1.0 -headless "macro:///IntellincLib.Conversions.convertjpg"
But now i try call the code from the following simple php script:
exec("PATH TO SCRIPT/convert_jpg");
I then enter ps -A to see what processes are running the following is displayed
? 00:00:00 convert_jpg
? 00:00:00 soffice.bin
? 00:00:00 soffice.bin <defunct>
So soffice obviously failed to do what it was supposed to do because it's <defunct> ie called the exit function. The shell convert_jpg however does seem to have been called since it is listed.
My questions:
+ Why is the php script hanging and not executing the shell? (which as already said, works fine when entered manually)
- Why would soffice.bin exit prematurely?
I would really appreciate any help.
Thanks!
hagen