致命错误:未捕获的异常“ParseParseException",消息为“SSL 证书问题:无法获得本地颁发者证书" [英] Fatal error: Uncaught exception 'ParseParseException' with message 'SSL certificate problem: unable to get local issuer certificate'

查看:44
本文介绍了致命错误:未捕获的异常“ParseParseException",消息为“SSL 证书问题:无法获得本地颁发者证书"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次使用 parse.com php SDK 并尝试执行以下代码

This is the first time I use parse.com php SDK and I try to execute the following code

<?php require '../autoload.php'; 
use ParseParseObject;
use ParseParseClient;
ParseClient::initialize( "Zsr...", "BzM..", "D..." );
$gameScore = new ParseObject("GameScore");
$gameScore->set("score", 1337);
$gameScore->set("playerName", "Sean Plott");
$gameScore->set("cheatMode", false);

try {
        $gameScore->save();
         echo 'New object created with objectId: ' . $gameScore->getObjectId();
        } catch (ParseException $ex) { 
          // Execute any logic that should take place if the save fails.
          // error is a ParseException object with an error code and message.
          echo 'Failed to create new object, with error message: ' + $ex->getMessage();
    }
?>

但是我得到那个错误

 Fatal error: Uncaught exception 'ParseParseException' with message 'SSL certificate problem: unable to get local issuer certificate' in /opt/lampp/htdocs/parse/src/Parse/ParseClient.php:250 Stack trace: #0 /opt/lampp/htdocs/parse/src/Parse/ParseObject.php(925): ParseParseClient::_request('POST', '/1/classes/Game...', NULL, '{"score":1337,"...', false) #1 /opt/lampp/htdocs/parse/src/Parse/ParseObject.php(836): ParseParseObject::deepSave(Object(ParseParseObject), false) #2 /opt/lampp/htdocs/parse/src/hola.php(11): ParseParseObject->save() #3 {main} thrown in /opt/lampp/htdocs/parse/src/Parse/ParseClient.php on line 250

代码是教程代码,我没有改过任何东西有人知道是什么问题吗?

The code it's the tutorial code, iI haven't changed anything anyone knows what's the problem?

推荐答案

我也遇到了同样的问题.现在我解决了使用其他论坛的答案.

I am also getting same issue. Now I resolve using some other forums answer.

打开你的 ParseClient.php 并找到:

Open your ParseClient.php and find:

curl_init();

然后添加行添加:

curl_setopt($rest, CURLOPT_SSL_VERIFYPEER, false);

它会起作用.

这篇关于致命错误:未捕获的异常“ParseParseException",消息为“SSL 证书问题:无法获得本地颁发者证书"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆