Parse.com PHP Help please? |
[eluser]Unknown[/eluser]
Hi there, Im a total newbie to php and CodeIgnitor (I'm a C# developer). However I have been tasked to make a CMS for parse.com which we are using as a backend for our apps. So I made a basic form from this page (https://ellislab.com/codeigniter/user-gu...ml#theform). Which is great and works fine, i am now trying to add the parse php sdk, I have followed the guidelines which has created a vendor file in my application/libraries amongst other things. Now if i call a function with any parse code in it my screen is white blank. Does this suggest that I haven't implemented the sdk properly? Does anyone have a very basic project that has the parse sdk implemented? here is some code, if i comment out the CreateObject function it works fine but if i uncomment i get the white blank screen. Code: <?php Any help would be much appreciated. Below is a link to a simple codeigniter project with the parse php sdk, if someone could tell me where I'm going wrong that would be great (the parse code is in welcome.php and I've removed my app keys etc so obviously this won't work) https://www.dropbox.com/sh/rda2m8wm8bs5v...U816_KPJna
[eluser]CroNiX[/eluser]
Blank screen usually indicates you have error reporting suppressed. Have you checked the apache and php log files?
[eluser]Tim Brownlaw[/eluser]
Ok I downloaded and installed your script and I found the following... Yep, you don't have error reporting enabled as it went to town complaining! FATAL Error: Parse\ParseObject not found in welcome.php line 52 ( I moved things so it is around that ). 1. In your welcome.php Code: class Welcome extends CI_Controller { Use Double Underscores for __construct()... You just had a single one. There was no error reported... I tested that the Constructor was being called with a simple Code: echo "hi I am the constructor"; 2. The location of your Parse Folder... Move it up one level, which will put it outside of the application folder. After I found the autoloader in the controllers folder, I got it to echo the actual path. Once I moved the folder up a level I got the ole Authorization Errors and not the FATAL I cannot find Parse\ParseClient.... 3. I see you have a Parse Folder with an Internal Folder with NO Files and a parse folder with just an internal folder with the Files. I moved the parse/internal (lower case folder name parse) files into the Parse/internal folder (upper case folder name Parse) and deleted the whole parse folder. So I now get as far as... Code: ( ! ) Fatal error: Uncaught exception 'Parse\ParseException' with message 'unauthorized' in /home/ciparsedebug/public_html/Parse/ParseClient.php on line 259 Which I am guessing is a good thing Cheers |
Welcome Guest, Not a member yet? Register Sign In |