Проблемы с Тессерактом на Mac «XAMPP»Php

Кемеровские программисты php общаются здесь
Ответить
Гость
 Проблемы с Тессерактом на Mac «XAMPP»

Сообщение Гость »


I've installed tesseract on mac (ventura). When i run it in terminal it works fine. when I run the html php code using the apache2 server located in the '/usr/local/' path it works. I'm not sure about the one in the '/private/' path, if that makes sense.

My issue comes when I try to run tesseract on xampp!

On mac I first get the error:

Error! The command "tesseract" was not found. Make sure you have Tesseract OCR installed on your system: https://github.com/tesseract-ocr/tesseract The current $PATH is /usr/bin:/bin:/usr/sbin:/sbin If I change the execution path i get the following error:

[01-Mar-2024 14:33:41 Europe/Berlin] PHP Fatal error: Uncaught thiagoalessio\TesseractOCR\UnsuccessfulCommandException: Error! The command did not produce any output. Generated command: "/usr/local/Cellar/tesseract/5.3.4_1/bin/tesseract" "uploads/test.png" "/var/folders/ct/4574d7l95d71vhc0bf_mj7rr0000gn/T/" -c "tessedit_char_whitelist=ABCDEFGHIJKLMNOPQRSTUVWXYZ" -l eng Returned message: dyld[2171]: Symbol not found: _WebPMalloc Referenced from: /usr/local/Cellar/webp/1.3.2/lib/libwebpmux.3.0.13.dylib Expected in: /Applications/XAMPP/xamppfiles/lib/libwebp.7.dylib in /Applications/XAMPP/xamppfiles/htdocs/texte/vendor/thiagoalessio/tesseract_ocr/src/FriendlyErrors.php:66 My guess is that it has something to do with (1) either php xampp executing commands because i've also tried executing tesseract commands in php and nothing works. Or, (2) the environment path - I'm not sure how it works so i can't properly explain it.

The code that I'm using is:



Источник: https://stackoverflow.com/questions/780 ... -mac-xampp
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Php»