diff --git a/routes/web.php b/routes/web.php index a7e2ac6..012fdc7 100644 --- a/routes/web.php +++ b/routes/web.php @@ -31,6 +31,17 @@ use thiagoalessio\TesseractOCR\TesseractOCR; ]); }); + Route::get('/debug-env', function () { + return response()->json([ + 'php_sapi' => php_sapi_name(), + 'user' => trim(shell_exec('whoami')), + 'which_tesseract' => trim(shell_exec('which tesseract')), + 'path' => getenv('PATH'), + 'php_binary' => PHP_BINARY, + 'disable_functions' => ini_get('disable_functions'), + ]); +}); + Route::post('/verify-ocr', function (Request $request) { if (!$request->has('path')) {