我试图使用Geocaching.com API服务访问用户信息。使用下面的脚本,我得到了下面提到的错误:
如果我使用它“开箱即用”(在一个实时服务器上),我会得到以下消息:
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in /home/mrmemeco/public_html/geo/src/Geocaching/OAuth/OAuth.php on line 329
Fatal error: Uncaught exception 'Exception' with message '28' in /home/mrmemeco/public_html/geo/src/Geocaching/OAuth/OAuth.php:334 Stack trace: #0 /home/mrmemeco/public_html/geo/src/Geocaching/OAuth/OAuth.php(206): Geocaching\OAuth\OAuth->curl_request('http://staging....') #1 /home/mrmemeco/public_html/geo/index.php(50): Geocaching\OAuth\OAuth->getRequestToken() #2 {main} thrown in /home/mrmemeco/public_html/geo/src/Geocaching/OAuth/OAuth.php on line 334如果我以同样的方式使用它,但在本地主机上是取回HTTP错误:0并且不返回数据。
我已经做了一些谷歌,我已经检查了安全模式是关闭的,但我还没有joy。
这绝对不是我的API键,因为它们在活动的演示上很好地工作
发布于 2013-08-05 16:40:39
您会得到这个错误,因为服务器的配置不允许cUrl跟踪位置。解决这一问题的方法不止一种:
safe_mode = false.htaccess文件,并将其放入php_value safe_mode off或.safe_mode的值,在ini_set('safe_mode', false);中添加这一行我希望它能帮上忙
https://stackoverflow.com/questions/18061478
复制相似问题