Been working with the ocrsdk for a while now an I have successfully read and recognized characters on images using the submitImage and processDocument methods of the API. I decided to try the processField method and since, it has always given me an Error 500 - Internal Server Error. I don't know why this is happening. Although I am using the free trial account, it still says I have over 200 field recognition left.
Below is the code after submiting the image using submitImage method
.
.
.
.
// Send HTTP POST request and ret xml response
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_USERPWD, "$applicationId:$password");
curl_setopt($curlHandle, CURLOPT_USERAGENT, "PHP Cloud OCR SDK Sample");
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_POST, 1);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, $settings);
$url = 'http://cloud.ocrsdk.com/processFields?' . $params;
curl_setopt($curlHandle, CURLOPT_URL, $url);
$response = curl_exec($curlHandle);
if ($response == FALSE) {
$errorText = curl_error($curlHandle);
curl_close($curlHandle);
die($errorText);
}
$httpCode = curl_getinfo($curlHandle, CURLINFO_HTTP_CODE);//<------ Error 500 here
curl_close($curlHandle);
.
.
.
.
Like I said above, this is the only method that gives this error. Others I have tried works just fine.
Please kindly point in the right direction...
Thank you.
Comments
6 comments
I have the same problem , but I am using c#
To let us investigate the issue, please share or send to CloudOCRSDK@abbyy.com some additional information:
1) the name of your application,
2) the image you recognize,
3) the request URL you use for the recognition.
The email with the additional information sent
Dear LaDev,
The issue occurs due to an error in your XML-file: “buttom” instead of “bottom” in several places.
Thank you a lot Anastasia
I finally got past this problem. It turns out that I was sending the content of the image instead of the local path to the image. Thanks for the response though.
Please sign in to leave a comment.