I'm trying to use the exec()
PHP function to execute a .jar file (I know it's not a good practice, but it's the only solution I have at the moment), but I'm not getting good results. >
The code in question:
exec(java -jar /home/sistemas/relatorios/jasper_reports/NaturatinsJasperReports/NaturatinsJasperReports.jar 'SELECT * FROM ambiental.vw_fin_fua_ato_azul WHERE id_fua = 31968408 ' '/home/sistemas/relatorios/jasper_reports/jasper/memoria_calculo_azul.jasper' '/home/sistemas/relatorios/memoria_calculo_azul.pdf' '/home/sistemas/relatorios/jasper_reports/NaturatinsJasperReports/desenvolvimento.xml', $output)
I execute and simply get empty feedback. The variable $output
is set with a Array
and nothing else. However, the parameter-driven command works perfectly when executed via the terminal.
Does anyone have any ideas?
Thank you.