I have been trying to let know know if the exec() command in php executes successfully or not so i can echo certain messages accordingly. I tried the following
exec()
i do work for me
for system linux and lang:php,laravel
exec('/usr/bin/tesseract 2.png out1 -l '.$lang,$output,$error); return (!$error)? "success":"Error";