tesseract - PHP TesseractOCR exec command issue -
i have installed tesseractocr terminal of mac. when run following command terminal working.
tesseract "hello.png" /applications/mamp/tmp/php/987051047
but same command not working in
exec("tesseract "hello.png" /applications/mamp/tmp/php/987051047")
and full code
$tesseract = new tesseractocr("hello.png"); $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); $tesseract->settempdir( $tmp_dir ); $test = $tesseract->recognize();
i feel have load tesseract in php.ini or other configuration file. don't know where. using mac, mamp, php 5.4.10
ok after installation need change path bin
$path = getenv('path'); putenv("path=$path:/usr/local/bin");
add these lines , work
thanks
Comments
Post a Comment