创建资源时出错:[message] fopen():无法找到包装器

时间:2017-09-03 10:38:00

标签: php google-app-engine google-api

我使用简单的Google Books API测试了GAE,但我无法让它工作。身份验证适用于oauth2,但我仍然无法通过此错误消息:

" Error creating resource: [message] fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?"

我正在关注文档。这是我的PHP代码:

putenv('GOOGLE_APPLICATION_CREDENTIALS = ./gtmdocx-73165ebdfb29.json');
        $client = new Google_Client();
        $client->setApplicationName("My Application");
        $client->setDeveloperKey("AIzaSyD******************");
        $client->setHttpClient(new GuzzleHttp\Client(['verify' => false]));
        $service = new Google_Service_Books($client);

        $optParams = array('filter' => 'free-ebooks');
        $results = $service->volumes->listVolumes('Henry David Thoreau', $optParams);

        foreach ($results as $item) {
            echo $item['volumeInfo']['title'], "<br /> \n";
        }

我正在使用GuzzleHttp,它托管在Google App Engine中。应该在GAE中激活https还是SSL?

这是我的php.ini:

google_app_engine.enable_curl_lite = "1"
google_app_engine.enable_functions = "php_sapi_name"
extension = "php_curl.dll"
extension=curl.so

0 个答案:

没有答案