Stichoza/google-translate-php

cURL error 2: easy handle already used in multi handle

hassan-k001 opened this issue · 3 comments

cURL error 2: easy handle already used in multi handle (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) {"userId":1,"email":"admin@gmail.com","exception":"[object] (ErrorException(code: 0): cURL error 2: easy handle already used in multi handle (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) at /public_html/translator/vendor/stichoza/google-translate-php/src/Stichoza/GoogleTranslate/TranslateClient.php:318)

 public function translateText($string,$lang){
        if($string != null  && !is_int($string)){
            return TranslateClient::translate('en', $lang, $string);
        }
        return '';
    }

Working fine on localhost. but getting curl error on server after translating once.

php 7.0 , laravel 5.5

You're using outdated version of this package. Try v4

You're using outdated version of this package. Try v4

issue is resolved , however i am getting this error because of too many requests

Client error: GET https://translate.google.com/translate_a/single?client=webapp&hl=en&dt=t&dt=bd&dt=at&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&sl=en&tl=si&q=Under+foot&ie=UTF-8&oe=UTF-8&multires=1&otf=0&pc=1&trs=1&ssel=0&tsel=0&kc=1&tk=408044.2706` resulted in a `429 Too Many Requests``

i have google translate api credential json file for billable api. can i use that with this api ?
what would be the procedure for that.

I'm sure you closed the issue, because you found the answer to the '429 Too Many Requests', but if not, or someone else is wondering, this is an often mentioned known limitation that you can read more about on the project's homepage.