Android Question Example App using User Login (PHP/MySQL/API) on live server

stp

Active Member
Licensed User
Longtime User
Get a cheap/free shared hosting for testing.
If you want to use Python, try https://www.pythonanywhere.com/
Thank you for you reply, i have access on servers and vps. I am looking only for a workable example.
Would like to build a small test with user login forgot password and retrive it.
I prefer for now to use build the android App and the PHP/MySQL/API.
I dont want to use as i said the B4J server solution. Want to test it live.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
The example project is definitely working 100%! Check the attached zips in post #2.
If it is not working then it may due to deprecated functions in new version of PHP set in hosting.
I am using this in production for years.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
No, the link above is B4J server.

I mean the second post in the link you posted in your first post above.

1757664506604.png
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
In the past, I have put my server live for free testing.
More than 1000 users have tested using my server. (I received emails for new registration)
The attachments were downloaded > 2300 times.
Not many members have thanked me or liked my post.
 
Upvote 0

stp

Active Member
Licensed User
Longtime User
In the past, I have put my server live for free testing.
More than 1000 users have tested using my server. (I received emails for new registration)
The attachments were downloaded > 2300 times.
Not many members have thanked me or liked my post.
Wow!! I will test it
 
Upvote 0

stp

Active Member
Licensed User
Longtime User
I'll fix it 😁

I haven't downloaded/tried them (I will sooner or later) but I'll give you a "Like" on trust, I'm sure they are excellent sources/services.
Do you know why i get multiple error here Map1 ?
B4X:
If Map1.Get("Connected") = 1 Then

AppHome - 228: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppHome - 246: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppHome - 131: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppHome - 149: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppUser - 180: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppUser - 200: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppUser - 239: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppUser - 327: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppUser - 390: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppPassword - 118: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppPassword - 138: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppPassword - 209: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppPassword - 227: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)


All the errors is about Map1

is all about Map1 that repeats :
eg
B4X:
If Map1.Get("Connected") = 1 Then
or If Map1.Get("result") = -1 Then
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Do you know why i get multiple error here Map1 ?
B4X:
If Map1.Get("Connected") = 1 Then

AppHome - 228: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppHome - 246: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppHome - 131: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppHome - 149: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppUser - 180: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppUser - 200: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppUser - 239: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppUser - 327: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppUser - 390: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppPassword - 118: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppPassword - 138: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppPassword - 209: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)
AppPassword - 227: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)


All the errors is about Map1

is all about Map1 that repeats :
eg
B4X:
If Map1.Get("Connected") = 1 Then
or If Map1.Get("result") = -1 Then
You are quoting LucaMs comment?

The warning is due to deprecated code in "modern" version of B4X.
You need to change the code from:
B4X:
If Map1.Get("Connected") = 1 Then
to:
B4X:
If 1 = Map1.Get("Connected") Then
or
B4X:
If Map1.Get("Connected").As(Int) = 1 Then
 
Upvote 0

stp

Active Member
Licensed User
Longtime User
All fine. Another question: wich php version must i use to make it work? Try now also deprecated to make it work..
Because i get i message in my app
pppp3.jpg

Is that a problem because of the php version ?
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
All fine. Another question: wich php version must i use to make it work? Try now also deprecated to make it work..
Because i get i message in my app
View attachment 166777
Is that a problem because of the php version ?
If it is a Get request, you can check the output response in browser.
Better way is to check the API using Postman.
I suspect it is lacked of JSON content type or json_encode.
It can also happen if there is an error executing MySQL query.
 
Upvote 0

stp

Active Member
Licensed User
Longtime User
If it is a Get request, you can check the output response in browser.
Better way is to check the API using Postman.
I suspect it is lacked of JSON content type or json_encode.
It can also happen if there is an error executing MySQL query.
ok works. But after registration i dont get an email.. I checked the db record is created.

i see in your config:
/ Define Email Sender
define("ADMIN_EMAIL", "[email protected]");
define("NOREPLY_EMAIL", "[email protected]");

but dont i need an psw for the email to sent emails?
 
Upvote 0

stp

Active Member
Licensed User
Longtime User
ok i do. Thanks
Finaly the example worked. The problem i had with the email on live server was because i registred with my google account on the app and google filters the emails and sends them to spam. My live domain was to new... to send emails. So i had to "warm up" my ip, and also to set up DNS records for the domain.
;)
 
Upvote 0
Top