Hi,
I'm hosting my application both on win xp and fedora and a certain part of my web application needs to access an external program through any of the execute functions in php...exec...popen...shell_exec..system... etc
Both systems are hosted using apache.
The problem is, when calling open office (i'm sure any other external programs will have similar problem) multiple times through one of the functions, the process will hang when i check on it. This doesn't happen in windows hosted apache.
For example,
$cmd = "sh /usr/local/apache2/myproject/test.sh /path/to/file.htm";
exec($cmd, $output);
test.sh consist :
#!/bin/sh
/opt/openoffice.org3/program/soffice.bin -invisible -headless -nofirststartwizard "macro:///Standard.Conversion.ConvertHTMLToWord($1)"
Basically, the script just calls open office to convert my files into word documents. If i invoke the process once in a while it's okay, but if i do a page refresh like 5 times in 2 seconds, the processes will hang and i have to kill it manually.
Any ideas why? or is the exec function not suitable for linux?