parse.com-php-library
parse.com-php-library copied to clipboard
PHP Fatal error: Class 'parseRestClient'
Hey team
I am getting this: PHP Fatal error: Class 'parseRestClient'
Just testing out by creating an object and here is the code:
getting the same issue.
Yeah so I have skipped this route and just running curl from inside my PHP code using CURLOPT, something like this
error_reporting(-1); ini_set('display_errors', true); $handle = curl_init(); $url = "https://api.parse.com/1/classes/myClass"; $headers = array ( "Content-Type: application/json", "X-Parse-Application-Id: APPID", "X-Parse-REST-API-Key: RESTID" );
curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_POST, true); curl_setopt($handle, CURLOPT_HTTPGET, true);
$response = curl_exec($handle);
print "$response"; ///
The parseRestClient class is located in the parse.php file. You have to include it in your script. If you include it you don't need to include parseConfig.php because all parse library files are included in parse.php
It looks like the problem lies with header name and the class name don't match and it is required by some of the MVC framework.
I am following atkinja's method and works well but I want to know what if I need some specific data with particular key. Is it possible to do so? I need all records which are having a particular id in it.
No, usually that error means there is something wrong with the server you are on. It should give you more of an error message, can you post that? On Apr 11, 2014 4:56 AM, "iliyaskhan" [email protected] wrote:
I am following atkinja's method and works well but I want to know what if I need some specific data with particular key. Is it possible to do so? I need all records which are having a particular id in it.
— Reply to this email directly or view it on GitHubhttps://github.com/apotropaic/parse.com-php-library/issues/114#issuecomment-40195877 .
parseRestClient class are on file parse.php, include to on your project.