0

PHP curl request to retrive the data from server getting the response right.

But when i call from Android to HttpPost it returns this Error:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /service/v2/rest.php
on this server.</p>
<hr>
<address>Apache/2.2.0 (Fedora) mod_fcgid/2.3.6 PHP/5.2.17 mod_python/3.3.1 Python/2.4.3     
mod_perl/2.0.4 Perl/v5.8.8 Server at nl.wooning.cz Port 80</address>
</body></html>

Please help me.

Thanks in advance...!!!

Bhavin Nattar
  • 3,189
  • 2
  • 22
  • 30
John
  • 51
  • 1
  • 3
  • 13
  • 1
    Probably you need to login before you can access the php file... – RvdK Jul 08 '13 at 07:50
  • When i calls the api from PHP works fine no issue in PHP curl request. getting the error in HttpPost android calls. – John Jul 08 '13 at 07:53

2 Answers2

0

You need to provide the permission in .htaccess . Kindly check and provide permissions accordingly. See this for more information.

Thomas
  • 43,637
  • 12
  • 109
  • 140
KOTIOS
  • 11,177
  • 3
  • 39
  • 66
  • Can you please let me know , which type of permission I have to grant in .htaccess file. thanks. – John Jul 08 '13 at 07:54
  • refer this link may help you -http://www.techieshelp.com/you-don%E2%80%99t-have-permission-to-access-wp-adminpost-php-on-this-server/ – KOTIOS Jul 08 '13 at 08:00
0

Did you use this permission in your manifest file

 <uses-permission android:name="android.permission.INTERNET" />
Benil Mathew
  • 1,638
  • 11
  • 23
  • Yes... It have the internet permission. This app is working on other server but unfortunately not working on my another server. – John Jul 08 '13 at 11:05