Page 1 of 1

Error accessing Security: Access Forbidden

PostPosted: 01. March 2009 06:35
by shehaal
Hi there,

I have just installed XAMPP 1.7.0 on a Vista Ultimate machine to c:\xampp, along with the Perl addon. Upon trying to access the Security page, I receive the following error:
Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

I have had a look at the error log, which has the following related entry in it:
[Sun Mar 01 16:06:32 2009] [error] [client 127.0.0.1] client denied by server configuration: C:/xampp/security/htdocs/lang.php, referer: http://localhost/xampp/navi.php

I tried changing httpd-xampp.conf, so that all "Allow from localhost" entries are now "Allow from 127.0.0.1". I cleared my cache and cookies, etc, loaded up the XAMPP start page from 127 instead of localhost, went to the Security page - but still received the same error above. The new error in the error log file is:
[Sun Mar 01 16:10:00 2009] [error] [client 127.0.0.1] client denied by server configuration: C:/xampp/security/htdocs/lang.php, referer: http://127.0.0.1/xampp/navi.php

I then tried allowing both 127.0.0.1 and localhost for the security page, but I still get the same result. I have done some searching around on the forum here, but everything seems to point to the topic at viewtopic.php?p=136165#p136165 - however, that doesn't seem to be working for me. :| Note that I am able to access the various demos, such as the CD library, etc.

Currently, my httpd-xampp.conf file looks like this (security section included only!):
Code: Select all
    Alias /security "C:/xampp/security/htdocs/"
    <Directory "C:/xampp/security/htdocs">
      <IfModule php5_module>
         <Files "xamppsecurity.php">
            php_admin_flag safe_mode off
         </Files>
      </IfModule>
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1
        Allow from localhost
    </Directory>


Any ideas? Thanks for your help!

Re: Error accessing Security: Access Forbidden

PostPosted: 01. March 2009 07:40
by Izzy
I tried changing httpd-xampp.conf, so that all "Allow from localhost" entries are now "Allow from 127.0.0.1". I cleared my cache and cookies, etc, loaded up the XAMPP start page from 127 instead of localhost, went to the Security page - but still received the same error above. The new error in the error log file is:
I don't see where you saved the httpd-xampp.conf file and then restarted Apache.

You changed only 2 entries from Allow from localhost to Allow from 127.0.0.1 ?

Change your httpd.xampp.conf file back to Allow from 127.0.0.1 in the 2 places and remove the additional Allow from localhost.

Try a reboot and see if it helps after putting things back and after saving the file and restarting Apache.

Did you make any more changes to any other configuration file?


Go to C:\Windows\system32\drivers\etc\ and drag the Hosts file into a text editor and see if you have this line:
::1 localhost

If so comment it out so it looks like so:
# ::1 localhost

Save the file and try again to go to http://localhost/security

You must be an Administrator and UAC should be off to anything worthwhile in Vista.

Re: Error accessing Security: Access Forbidden

PostPosted: 01. March 2009 10:33
by shehaal
Hi Izzy,

httpd-xampp.conf was saved in the default location of c:\xampp\apache\conf\extra. I checked the hosts file, all okay there. There was also a restart of the apache service after I modified the conf file above, but I forgot to mention that in my original post. :) I have reverted the conf file as you suggested, restarted apache, and now it seems to be working okay! Not sure why it didn't work earlier.

Thanks for your help.

Re: Error accessing Security: Access Forbidden

PostPosted: 12. May 2009 16:09
by baijianpeng
Why we need to edit the file httpd-xampp.conf ?

I used XAMPP 1.6.x versions, I can visit the security page without any problem.

Today I make a fresh installation of XAMPP 1.7.0 and also met the same Access forbidden problem when trying to visit http://localhost/security/ .

Why?

Don't you think this is a BUG of XAMPP 1.7.0?

Hope you will fix it in next version.

Thanks.

Re: Error accessing Security: Access Forbidden

PostPosted: 15. May 2009 06:56
by Sharley
baijianpeng wrote:Hope you will fix it in next version.
Fixed in 1.7.1.

Re: Error accessing Security: Access Forbidden

PostPosted: 15. May 2009 07:09
by baijianpeng
Thank you very much.