java works but only part with php to transform xml
I am wanting to transform xml to pdf. This works from the command line using
java org.apache.xalan.xslt.Process -in fobar.xml -xsl foobar.xsl -outfoobar.fo
java org.apache.fop.apps.Fop -foobar.fo -pdf foobar.pdf
However when run from a script on a web page, on the same machine, using php with
exec('java org.apache.xalan.xslt.Process -in fobar.xml -xsl foobar.xsl -outfoobar.fo')
exec('java org.apache.fop.apps.Fop -foobar.fo -pdf foobar.pdf');
only the first line works. If I put the top two lines in an executable bash script and call it from the page it works but I don't want to open up the system so much.
I presume this is a question about path or classpath but have tried every variation that I can think of in bash.bashrc and profile.
Any thoughts would be appreciated - I work in php but java is actually a mystery to me.
Regards Richard
|