Android Studio unable to login in using REST service 403 forbidden

Hi

I have a small simple app that you can log into or register as a new user.

The platform is:
 Windows server 2013
Android Studio
JSON REST API
MYSQL database
WAMP
Apache web server
Hosted on  a VM
Access is from my local machine to the VM using my personal network.

The problem i have is when i login in i get a response from the app saying 'Incorrect username or password' even though i can verify that is the correct UID and PWD.
I ran the login section in debug mode and could see my UID and PWD being sent to the REST service in the correct format and matches whats set in the DB.
Likewise when i go to register a new user i get unable to register user. Even though I can see that my new user was reisgtered and the DB updated with my info.

When i review the android stusio log cat I see an error 403 forbidden  when attempting to log in or register a new user.

So this has made me think that the message has been read (UID, PWD) successfully but is not retuning a success message back to my app.
I can only think that is the apache httpd.conf is causing some access denied.
is there any setting wihtin that file that could be causing a 403 error?
wilko1000Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gheistCommented:
Look in apache error log?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
wilko1000Author Commented:
Apache log nothing relevant:

[Thu May 07 20:43:24.668732 2015] [mpm_winnt:notice] [pid 3616:tid 396] AH00455: Apache/2.4.9 (Win32) PHP/5.5.12 configured -- resuming normal operations
[Thu May 07 20:43:24.686733 2015] [mpm_winnt:notice] [pid 3616:tid 396] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:13:13
[Thu May 07 20:43:24.686733 2015] [core:notice] [pid 3616:tid 396] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.9\\bin\\httpd.exe -d C:/wamp/bin/apache/apache2.4.9'
[Thu May 07 20:43:24.692733 2015] [mpm_winnt:notice] [pid 3616:tid 396] AH00418: Parent: Created child process 3048
[Thu May 07 20:43:26.132815 2015] [mpm_winnt:notice] [pid 3048:tid 324] AH00354: Child: Starting 64 worker threads.
[Thu May 07 21:28:47.525391 2015] [mpm_winnt:notice] [pid 3616:tid 396] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Thu May 07 21:28:53.609402 2015] [mpm_winnt:notice] [pid 3048:tid 324] AH00364: Child: All worker threads have exited.
[Thu May 07 21:28:55.731005 2015] [mpm_winnt:notice] [pid 3616:tid 396] AH00430: Parent: Child process 3048 exited successfully.

 PHP logs how tack about depreciation, not sure if that would cause 403 error:

[24-Feb-2015 00:26:41 Europe/Paris] PHP Stack trace:
[24-Feb-2015 00:26:41 Europe/Paris] PHP   1. {main}() C:\wamp\www\RESTApi\index.php:0
[24-Feb-2015 00:26:41 Europe/Paris] PHP   2. DB_Functions->__construct() C:\wamp\www\RESTApi\index.php:19
[24-Feb-2015 00:26:41 Europe/Paris] PHP   3. DB_CONNECT->connect() C:\wamp\www\RESTApi\include\DB_Functions.php:13
[24-Feb-2015 00:26:41 Europe/Paris] PHP   4. mysql_connect() C:\wamp\www\RESTApi\db_connect.php:28
[24-Feb-2015 00:26:41 Europe/Paris] PHP Deprecated:  mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\wamp\www\RESTApi\db_connect.php on line 28

Acce log show:

127.0.0.1 - - [07/May/2015:21:25:05 +0100] "GET /phpmyadmin/db_structure.php?server=1&db=&token=28fca39122735352029ff889f9fcaf42&ajax_request=true&ajax_page_request=true&menuHashes=73576858-8e7c1637-57ebd3e0-039a4e1f-cdd97c02-ebda6254-410af484&_nocache=1431030305282807846 HTTP/1.1" 200 14890
127.0.0.1 - - [07/May/2015:21:25:08 +0100] "GET /phpmyadmin/index.php?token=28fca39122735352029ff889f9fcaf42&ajax_request=true&ajax_page_request=true&menuHashes=73576858-8e7c1637-57ebd3e0-039a4e1f-cdd97c02-ebda6254-410af484&_nocache=1431030308781157324 HTTP/1.1" 200 38594
127.0.0.1 - - [07/May/2015:21:25:09 +0100] "GET /phpmyadmin/version_check.php?&_nocache=1431030309377128445 HTTP/1.1" 200 39
127.0.0.1 - - [07/May/2015:21:25:11 +0100] "GET /phpmyadmin/server_privileges.php?db=&token=28fca39122735352029ff889f9fcaf42&viewing_mode=server&ajax_request=true&ajax_page_request=true&menuHashes=8e7c1637-57ebd3e0-039a4e1f-cdd97c02-ebda6254-410af484-4f748949&_nocache=1431030311052627923 HTTP/1.1" 200 13201
127.0.0.1 - - [07/May/2015:21:25:11 +0100] "GET /phpmyadmin/js/get_scripts.js.php?scripts[]=server_privileges.js&token=28fca39122735352029ff889f9fcaf42&call_done=1 HTTP/1.1" 200 26581
192.168.1.6 - - [07/May/2015:21:25:41 +0100] "POST /RESTApi/ HTTP/1.1" 200 80
192.168.1.6 - - [07/May/2015:21:26:21 +0100] "POST /RESTApi/ HTTP/1.1" 200 5271
192.168.1.6 - - [07/May/2015:21:26:43 +0100] "POST /RESTApi/ HTTP/1.1" 200 80
0
gheistCommented:
But none of that logs show 403 being passed to user. Can you try to record traffic with network monitor or wireshark on your server when 403 occurs? Then on android accessing it over private wifi?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.