Jump to content


Photo

Error: "You Don't Have Permission to access ..."


  • Please log in to reply
2 replies to this topic

#1 Len Jacobson

Len Jacobson

    Junior Member

  • Member
  • Pip
  • 17 posts
  • Gender:Male
  • Main OS: Other

Posted 13 August 2019 - 11:33 PM

I have not used Uniform Server in a while.  I am presently using PHP Version 5.6.19.

 

I have defined a "<Virtual Host>" with the name, "laptop-test-server".  It appears to be properly recognized.

 

If I then open a PHP file on the test server with the URL "laptop-test-server/include/somePHPfile.php", I get the following error message:

 

 

Forbidden

 

You don't have permission to access /include/somePHPfile.php

 

 

But if I open that same PHP file on the test server with the URL "localhost/include/somePHPfile.php", it works fine.

 

Similarly, if I open it with the URL "127.0.0.1/include/somePHPfile.php", it also works fine.

 

Can someone point me in the direction to fix this problem?

 

Thanks much.

 

Len Jacobson



#2 Len Jacobson

Len Jacobson

    Junior Member

  • Member
  • Pip
  • 17 posts
  • Gender:Male
  • Main OS: Other

Posted 14 August 2019 - 11:54 AM

My son came up with the solution.

 

In the 'hosts' file, I needed to have on one line the following:

 

      127.0.0.1   localhost   laptop-test-server

 

Previously, I had them on separate lines.  To be honest, I don't know why it worked when I put them all on one line, but the bottom line is that that's how I got it to work.



#3 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,351 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 10

Posted 19 August 2019 - 09:31 AM

lol, great. 






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users