diff --git a/routes/web.php b/routes/web.php index 012fdc7..7640865 100644 --- a/routes/web.php +++ b/routes/web.php @@ -42,6 +42,22 @@ use thiagoalessio\TesseractOCR\TesseractOCR; ]); }); +Route::get('/debug-tesseract', function () { + $output = []; + $status = null; + + exec('/usr/bin/tesseract --version 2>&1', $output, $status); + + return response()->json([ + 'status' => $status, + 'output' => $output, + 'whoami' => trim(shell_exec('whoami')), + 'php_sapi' => php_sapi_name(), + 'path' => getenv('PATH'), + 'disable_functions' => ini_get('disable_functions'), + ]); +}); + Route::post('/verify-ocr', function (Request $request) { if (!$request->has('path')) {