谷歌php api app引擎上的PHP致命错误

时间:2013-11-07 23:18:08

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

当我尝试实施Google+ PHP API时,我的应用引擎出现问题,它在curl文件“Goolge_IO.php”中给出了致命错误,它是{{3}上提供的库文件之一}}

这是详细的错误

Fatal error: Uncaught exception 'Exception' with message 'Google CurlIO client requires the CURL PHP extension' in C:\Users\joker\Desktop\\plus\src\io\Google_CurlIO.php:47 Stack trace: #0 C:\Users\joker\Desktop\plus\src\Google_Client.php(106): Google_CurlIO->__construct() #1 C:\Users\joker\Desktop\plus\index.php(22): Google_Client->__construct() #2 C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\php\setup.php(100): require('C:\Users\joker\...') #3 {main} thrown in C:\Users\joker\Desktop\plus\src\io\Google_CurlIO.php on line 47

2 个答案:

答案 0 :(得分:4)

打开配置文件 - >谷歌-API的PHP的客户端/ SRC / config.php中

第38行

,你会发现:

// Which Authentication, Storage and HTTP IO classes to use.

在它下面替换为此代码:

// Which Authentication, Storage and HTTP IO classes to use.
'authClass'    => 'Google_OAuth2',
'ioClass'      => 'Google_HttpStreamIO',
'cacheClass'   => 'Google_MemcacheCache',

// We need to configure fake values for memcache to work
'ioMemCacheCache_host' => 'does_not_matter',
'ioMemCacheCache_port' => '37337',

答案 1 :(得分:-1)

您想再次阅读错误

'Google CurlIO client requires the CURL PHP extension'

你安装了cURL吗?如果您正在运行Linux系统,则需要使用类似

的内容
  

apt-get install php5-curl

在Windows上,假设您正在使用类似XAMPP的内容,它已经在文件中存在cURL插件,并且您将要取消注释该行

  

;延长= php_curl.dll

来自你的php.ini文件。