Added debug route for ocr
This commit is contained in:
@@ -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')) {
|
||||
|
||||
Reference in New Issue
Block a user