Error 403 in Android project with Webservice using Wampserver

Asked

Viewed 57 times

-1

After implementing Webservice in my project and using Debug to check if everything is right, it returned me the same error 403 is in the image. After searching about, I confirmed that the app’s programming is correct, the PHP scripts are also correct, so the problem is on the Apache side with respect to permissions. I use Wampserver, that’s where the problem comes in, because that part is no longer known to me, so I don’t know how to solve it. I tried to look around, most similar cases told me to change some things in the httpd.conf document that is inside Apache, but at least so far has not helped. For now I just programmed the app to fetch data that is on the internet, I saved it in phpMyAdmin

.inserir a descrição da imagem aqui

  • Can you access the script through the browser? If you also get error 403 is probably the folder permission or in the PHP file.

  • Which one, what do I use as a URL in the project, which is written in the image, Apisincronizarsistema? There’s this one and another where I saved the localhost information, pass. The first one returns "sucess = false" when I try.

  • Then I understood that the problem is in the access permissions of Apache, the problem is that I do not know where I change this, I understand almost nothing of Wampserver

1 answer

0

As Ricardo said try to access the URL from the browser, the same that you are trying to access from the app, if return 403 is problem access folder or permissions of your php program.

To release the permissions try the following:

  • in httpd.conf

Look for those lines:

<Directory/>
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>

Then replace it with:

<Directory/>
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>

Still at httpd.conf look for:

Order Deny,Allow
Deny from all
Allow from 127.0.0.1

and replace with:

Order Deny,Allow
Deny from all
Allow from All

Save and close the file and restart the services (Note: whenever you change something in configuration files you have to restart to load the new configuration)

Restart all services

Browser other questions tagged

You are not signed in. Login or sign up in order to post.