I've been banging my head against the wall trying to get this going and can't seem to get anywhere.
The goal is to call FOP from php to automate the generation of pdfs.
I can run this command from the command line successfully:
sh /fop/fop -c /fop/SI.conf.xml -fo /fop/temp/test.fo -pdf /fop/temp/test.pdf
When I try to run this from a php script using exec, shell_exec, or passthru:
Command:
export JAVA_HOME="/usr/local/jdk1.5.0_05"
sh /fop/fop -c /fop/SI.conf.xml -fo $foFile -pdf $pdfFile 2>&1
I get the same error:
Error: JAVA_HOME is not defined correctly.
We cannot execute /usr/local/jdk1.5.0_05 /bin/java
It would appear that the system is incorrectly appending /bin/java to the JAVA_HOME variable
it should try be executing:
/usr/local/jdk1.5.0_05/bin/java
instead of:
/usr/local/jdk1.5.0_05 /bin/java
I am manually setting JAVA_HOME because if not the error is:
Error: JAVA_HOME is not defined correctly.
We cannot execute java
Anybody have any clues or ideas???