Calling a java program from Yii2

I need to call a java program to get MRZ data from a passport.
How can i call this java program from Yii2.
I have tryed sell_exec but it didn’t work from Yii2 although it works from a normal PHP page.

In this case, Yii does not belong to the problem, because it is a PHP issue.

Try with exec or shell_exec

Thanks for your answer but i think you haven’t read the issue properly. Shell_exe works on PHP but its does not on yii.

There are not reasons because it should not work on Yii.

Yii is always PHP.

Thanks Fabrizio for your answer. I have already solved the problem. It was a issue with the Path. I was using an absolute path and when i start to use the base Path of the the APP given by yii all went well.

Na(o) segunda, 31/12/2018, 14:13, Fabrizio Caldarelli forum@yiiframework.com escreveu: