3

I have used the following code for get db data:

require 'autoload.php';
$app_id='AAAAA';
$rest_key='XXXXX';
$master_key='RRRRR';

use Parse\ParseObject;
use Parse\ParseQuery;
use Parse\ParseACL;
use Parse\ParsePush;
use Parse\ParseUser;
use Parse\ParseInstallation;
use Parse\ParseException;
use Parse\ParseClient;
use Parse\ParseAnalytics;
use Parse\ParseFile;
use Parse\ParseCloud;
ParseClient::initialize( $app_id, $rest_key, $master_key );
$object = new ParseQuery("Schools");
$playername = $object->get("playername");

I am having a "Schools"class in my parse account db with some data. I am try to get the "playername" value but I got the following error:

Fatal error: Uncaught exception 'Parse\ParseException' with message 'SSL certificate problem: unable to get local issuer certificate' in C:\xampp\htdocs\planlet\src\Parse\ParseClient.php:250 Stack trace: #0 C:\xampp\htdocs\planlet\src\Parse\ParseQuery.php(305): Parse\ParseClient::_request('GET', '/1/classes/Scho...', NULL, NULL, false) #1 C:\xampp\htdocs\planlet\src\Parse\ParseQuery.php(248): Parse\ParseQuery->find(false) #2 C:\xampp\htdocs\planlet\src\Parse\ParseQuery.php(70): Parse\ParseQuery->first(false) #3 C:\xampp\htdocs\planlet\first.php(23): Parse\ParseQuery->get('schoolName') #4 {main} thrown in C:\xampp\htdocs\planlet\src\Parse\ParseClient.php on line 250

now i am working on my localhost xampp server XAMPP 1.8.2 [PHP: 5.4.31]

how to solve this problem?

2 Answers 2

6

There is a patch provided by Atif Ghaffar in https://groups.google.com/forum/#!topic/parse-developers/f5RPj6DHA2E group to work with Parse SDK in XAMPP environment.

You can fix the issue by replacing your ParseClient.php file with this https://gist.githubusercontent.com/allinora/df4dde146bdc4d635306/raw/67a4c2a560e3f69c3d4e4f51b00e5711dc94b520/ParseClient.php

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

Comments

2

I was Getting the same issue. you need to tell curl not verify ssl peer in parse library. To do this go to Parse/ParseClient.php

open this file, you will find

 $rest = curl_init();

after this line add the following code

curl_setopt($rest, CURLOPT_SSL_VERIFYPEER, false);

this will solve your problem

Comments

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.