0

I have a file which is stored in magento root.If I access this file from browser like : localhost/test_magento/new.php,it works fine.

But when I tried to access this file from android mobile it always respond me with "403 Forbidden : You don't have permission to access /test_magento/new.php on this server".

Where I am going wrong ?

  • this is problem my site and i have use this code and resloved the problem. – Ashvin Monpara Jun 29 '15 at 5:37
  • 1
    probably you have some ACL in your htaccess file, that blocks user agent string or device type or ip address?? – user2857 Jun 29 '15 at 15:14
  • Cam you please elaborate this ? How to overcome or find this ? – Krupali Mehta Jun 30 '15 at 5:16
  • As @ADM already mentioned: Check your .htaccess file for any Deny from... section. – Anna Völkl Jun 30 '15 at 7:18
  • I have set all to "Allow from all" But no change in situation. – Krupali Mehta Jun 30 '15 at 10:25
0

Check your permissions and user, this error usually occurs when you do not have access. Try PHP get_current_user() in your script to access the user you are accessing the script with.

Then if you have command line access (ssh) proceed to your script and perform:

ls -alh

This will list the file, its owner and its permissions. The owner or group of your script may not be accessible from the user on your android device. It may not be readable to others, something like: rwxrwx--- (the last 3 dashes represent access to other users other than the group and owner).

Perform a:

chmod a+r your-script.php 

To change its permissions and give that a try. Let me know if you have a problems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.