Fatal error: Uncaught exception #39;ParseParseException#39; with message #39;SSL certificate problem: unable to get local issuer certificate#39;(致命错误:未捕获的异常“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 证书问题:无法获得本地颁发者证书"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:致命错误:未捕获的异常“ParseParseException",消息为“SSL 证书问题:无法获得本地颁发者证书"
基础教程推荐
- phpmyadmin 错误“#1062 - 密钥 1 的重复条目‘1’" 2022-01-01
- Doctrine 2 - 在多对多关系中记录更改 2022-01-01
- 如何在 Symfony 和 Doctrine 中实现多对多和一对多? 2022-01-01
- HTTP 与 FTP 上传 2021-01-01
- 使用 PDO 转义列名 2021-01-01
- 找不到类“AppHttpControllersDB",我也无法使用新模型 2022-01-01
- 在 yii2 中迁移时出现异常“找不到驱动程序" 2022-01-01
- 在 CakePHP 2.0 中使用 Html Helper 时未定义的变量 2021-01-01
- 如何在 XAMPP 上启用 mysqli? 2021-01-01
- PHP 守护进程/worker 环境 2022-01-01