Jeff Givens
Posts: 0
Joined: Sat Aug 10, 2013 8:20 pm

MySQL Login Using PHP Script for a Wordpress Site (Script located on same server as database--not Appery.io)

I have an app that I’m working on that I’m having user login issues. I broke out into a smaller app just for testing/debugging purposes. The issue I’m having is this: I am using a PHP script to pull user/login information from a MySQL database being used with a WordPress website to establish a connection. I’ve replaced the “print_r($user)” with a simple “true” state as seen below in the service test. Unfortunately, when I test the app, regardless of whether or not my login credentials are correct, I cannot seem to get a “success” return to invoke my ‘Navigate to Page’ event. I’ve tested this PHP script on hurl.it and verified a successful login return value. Also, as seen in the “Test” section for the service, you can see the Response is ‘true’ as well.
So my question is this: “What is the condition that must be met for the Success event to occur when using a service?” Simply that it is not an error?

Here is a link to a word document that has some screenshots of what I described above:
https://app.box.com/s/snq0nvor5kdctgp...

Also, I have already read the following page on handling REST Services, so please do not refer me to that page as the answer:
http://docs.appery.io/documentation/u...

Jeff Givens
Posts: 0
Joined: Sat Aug 10, 2013 8:20 pm

MySQL Login Using PHP Script for a Wordpress Site (Script located on same server as database--not Appery.io)

I am currently using the proxy. I will look into the console to see what I find. Will update soon as I figure something out. Thanks for expedient response.

Jeff Givens
Posts: 0
Joined: Sat Aug 10, 2013 8:20 pm

MySQL Login Using PHP Script for a Wordpress Site (Script located on same server as database--not Appery.io)

So I tested using the console. Without a doubt, any 'failure' events on Errors are working perfectly :-) The problem is...even a valid login is getting me an error, apparently. Here are the results from my Console debugging:

http://snag.gy/kcP8G.jpg

The "Status Text 200 OK" line is where I entered the correct login information. The others were all incorrect login info.

Jeff Givens
Posts: 0
Joined: Sat Aug 10, 2013 8:20 pm

MySQL Login Using PHP Script for a Wordpress Site (Script located on same server as database--not Appery.io)

Method: post
Data Type: xml
Settings: none
Security Content: none
Content Type: x-www-form-urlencoded
Use Proxy: (checked)

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

MySQL Login Using PHP Script for a Wordpress Site (Script located on same server as database--not Appery.io)

I meant the actual data from the service if the login is successful.

Jeff Givens
Posts: 0
Joined: Sat Aug 10, 2013 8:20 pm

MySQL Login Using PHP Script for a Wordpress Site (Script located on same server as database--not Appery.io)

I can also change it to "Data type: json" and get the same result.

Jeff Givens
Posts: 0
Joined: Sat Aug 10, 2013 8:20 pm

MySQL Login Using PHP Script for a Wordpress Site (Script located on same server as database--not Appery.io)

It's weird because I can reference the Response which is listed as:
"$" (an array) with a sub-parameter "success".

I can map that "success" index to a Label on the screen. When I use 'correct' login credentials, it will change the Label text to "true" and if I put in bad credentials, it changes the label to "false"

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

MySQL Login Using PHP Script for a Wordpress Site (Script located on same server as database--not Appery.io)

I'm looking to see the actual response from your service. Can you post a screen shot from Test tab?

Return to “Issues”