From 69ec903794350535237014ddda3512c1f13c0b87 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Thu, 23 Oct 2025 14:06:40 +0530 Subject: [PATCH] Added debug route for ocr --- routes/web.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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')) {