Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.0k views
in Technique[技术] by (71.8m points)

php - URL error 0: The cURL request was retried 3 times and did not succeed

I am working on a project that is hosted on Google App Engine, and using app_devserver for local development. At the start I had problems with certificates but when I finally got over that error I am getting this new error

I am using Windows 10 and PHPstorm for development.

Error:

Message: cURL error 0: The cURL request was retried 3 times and did not succeed. The most likely reason for the failure is that cURL was unable to rewind the body of the request and subsequent retries resulted in the same error. Turn on the debug option to see what went wrong. See https://bugs.php.net/bug.php?id=47204 for more information. (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

Looks like this error is saying that the request is made and successfull but the body could not be resolved or parsed? How can I resolve it?

This is my PHP code if needed: (simple call to tag manager api v2)

    $client = new Google_Client();
    $client->setAuthConfig('service_account.json');

    $client->setApplicationName("gtmdocx");
    /*$client->setScopes(['https://www.googleapis.com/auth/tagmanager.readonly',
                        'https://www.googleapis.com/auth/tagmanager.manage.accounts',
                        'https://www.googleapis.com/auth/tagmanager.edit.containers']);*/
    $client->setScopes(['https://www.googleapis.com/auth/tagmanager.readonly']);
    $service = new Google_Service_TagManager($client);
    $results = $service->accounts->listAccounts();


    echo $_GET['callback'] . '('.json_encode($results).')';
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...