Added debug env for ocr

This commit is contained in:
dhanabalan
2025-10-23 14:03:46 +05:30
parent ef81309cf8
commit a0d77f8df7

View File

@@ -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')) {