Search code examples
phppermissionswebserver

403 Forbidden response – what should I look for?


I have a script giving me error 403 Forbidden error, it's just a copy of another script but the difference in this is that both use another mysql class to access database.

My whole project is complete and this is last file so I don't want to do the whole work again for a single file.

Server logs shows that client denied by server configuration:

What should I look for?

I have tried the following:

  • Permissions are 644
  • New file with just simple echo gives 403 too
  • Changed name of folder

However, index.php works perfectly.


Solution

  • This issue occurs if you have had denied for all in your .htaccess file. Changing that resolves the issue.