thiagoalessio / tesseract-ocr-for-php

A wrapper to work with Tesseract OCR inside PHP.
https://packagist.org/packages/thiagoalessio/tesseract_ocr
MIT License
2.86k stars 551 forks source link

Error! The command did not produce any output. #182

Closed akbarjondev closed 4 years ago

akbarjondev commented 4 years ago

Hi @thiagoalessio I am using web hosting server (beget.com) please help me with this error: err

Fatal error: Uncaught thiagoalessio\TesseractOCR\UnsuccessfulCommandException: Error! The command did not produce any output. Generated command: "/home/g/gimmick/@@@.ru/public_html/bots/../tesseract/vendor/thiagoalessio/tesseract_ocr/src/TesseractOCR.php" "frame.jpg" "/tmp/ocrJvi4pJ" Returned message: sh: 1: /home/g/gimmick/@@@.ru/public_html/bots/../tesseract/vendor/thiagoalessio/tesseract_ocr/src/TesseractOCR.php: Permission denied in /home/g/gimmick/@@@.ru/public_html/tesseract/vendor/thiagoalessio/tesseract_ocr/src/FriendlyErrors.php:74 Stack trace: #0 /home/g/gimmick/@@@.ru/public_html/tesseract/vendor/thiagoalessio/tesseract_ocr/src/TesseractOCR.php(39): thiagoalessio\TesseractOCR\FriendlyErrors::checkCommandExecution(Object(thiagoalessio\TesseractOCR\Command), '', 'sh: 1: /home/g/...') #1 /home/g/gimmick/@@@.ru/public_html/bots/testejarimabot.php(409): thiagoalessio\TesseractOCR\TesseractOCR->run() #2 {main} thrown in /home/g/gimmick/@@@.ru/public_html/tesseract/vendor/thiagoalessio/tesseract_ocr/src/FriendlyErrors.php on line 74

thiagoalessio commented 4 years ago

->executable() should point to the real tesseract binary, not the PHP wrapper. Please do not open issues for asking questions, post them on our Gitter instead.