0

I am using the "Hello World" of Php Parse Sdk

My code:

<?php 
require 'vendor/autoload.php';

use Parse\ParseClient;

ParseClient::initialize('WVqz27oWBfP2weewrfeweKAlVWymjltMGqi9h', 'jgtaXI1Nrim1B4fdnewewewef3iNXgER8y', 'JD8B6dNL9FleweewewhjvvwZwIlc800');

use Parse\ParseObject;

$testObject = ParseObject::create("TestObject");
$testObject->set("foo", "bar");
$testObject->save();

?>

and the error:

Fatal error: Uncaught exception 'Parse\ParseException' with message 'SSL certificate problem: unable to get local issuer certificate' in C:\xampp\htdocs\parsesdk\vendor\parse\php-sdk\src\Parse\ParseClient.php:250 
Stack trace: #0 C:\xampp\htdocs\parsesdk\vendor\parse\php-sdk\src\Parse\ParseObject.php(915): Parse\ParseClient::_request('POST', '/1/classes/Test...', NULL, '{"foo":"bar"}') 
#1 C:\xampp\htdocs\parsesdk\vendor\parse\php-sdk\src\Parse\ParseObject.php(828): Parse\ParseObject::deepSave(Object(Parse\ParseObject)) 
#2 C:\xampp\htdocs\parsesdk\index.php(12): Parse\ParseObject->save() 
#3 {main} thrown in  C:\xampp\htdocs\parsesdk\vendor\parse\php-sdk\src\Parse\ParseClient.php on line 250

1 Answer 1

5

option 1:

You can follow the url http://curl.haxx.se/ca/cacert.pem to download cacert.pem file. Then go to php.ini set curl.cainfo = "c:/cacert.pem".

option 2:

try to find the code curl_setopt($c, CURLOPT_URL, $url); in your project then add this code curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, TRUE); before.

Sign up to request clarification or add additional context in comments.

1 Comment

I am not using curl at all, so this answer has no value to me, any other suggestions?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.