Xampp 1.7 security 403 error on vista

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Xampp 1.7 security 403 error on vista

Postby Wil D. » 23. December 2008 13:34

Hi, I tried to install Xampp 1.7 on Vista. As I had 1.6.8 installed, I did a complete uninstall, then a reinstall with 1.7. It seems I am not able tot access the security form on xampp with a 403 error. User SYSTEM has all rights on the security folder.
When I uninstalled 1.7 and reinstalled 1.6.8, I was able to access the security panel. Do I have to adapt something in the config file to be able to access the security alias with Xampp 1.7?
I did not have this problem on a computer running XP SP3.
Wil D.
 
Posts: 2
Joined: 23. December 2008 13:27

Re: Xampp 1.7 security 403 error on vista

Postby faqtory » 23. December 2008 20:30

in \xampp\apache\conf\extra\httpd-xampp.conf change red with green:
<Directory "/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 localhost

</Directory>

...
Alias /phpmyadmin "/xampp/phpMyAdmin/"
<Directory "/xampp/phpMyAdmin">
AllowOverride AuthConfig
Order allow,deny
Allow from all

</Directory>

make your security things and then change back.
sorry i dont't speak good english
faqtory
 
Posts: 2
Joined: 23. December 2008 16:01

Re: Xampp 1.7 security 403 error on vista

Postby Wiedmann » 24. December 2008 02:06

In other words, the correct steps are:
1) open the file "\xampp\apache\conf\extra\httpd-xampp.conf" in a texteditor
2) replace "Allow from localhost" with "Allow from 127.0.0.1" (2 times)
3) save the file
4) restart Apache
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Xampp 1.7 security 403 error on vista

Postby Sharley » 24. December 2008 06:35

On Vista there is often an issue with localhost because of an IPv6 entry in the Windows HOSTS file that may be blocking your access to localhost.

Check in C:\Windows\system32\drivers\etc\HOSTS file for the IPv6 setting (open and edit the HOSTS file by dragging it into a text editor).

Find this IPv6 line:
::1 localhost

Comment it out so it looks like this:
# ::1 localhost

Make sure the first uncommented line is:
127.0.0.1 localhost

Save the file, restart Apache and then try to access your localhost again.
Also clear your browser's cache from time to time because when working at localhost level the cache can be a real pain in the head.

If this method fails to fix the issue then simply remove the comment you added in the HOSTS file, save again, then proceed with adding the local loop back IP address 127.0.0.1 as described in the above post.


It is not safe to Allow from all in your security settings, even for a moment - only allow access from your own PC (127.0.0.1 or localhost).
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Xampp 1.7 security 403 error on vista

Postby pja » 24. December 2008 07:21

Wil D. wrote:Hi, I tried to install Xampp 1.7 on Vista...


Hi! I had the same problem on Windows XP and the fix detailed above worked just fine.

Thanks and have a merry Xmas and a happy New Year whatever you believe in :D

Regards,
Peter
User avatar
pja
 
Posts: 6
Joined: 18. May 2007 04:49

Re: Xampp 1.7 security 403 error on vista

Postby Wil D. » 24. December 2008 10:41

I applied the solution from Wiedmann and changed localhost into 127.0.0.1 where needed. This did the trick. Thanks.
I did not adapt the hosts file, as I think I should not alter settings for IPV6 when not really necessary.
I also think that changing 'localhost' to 'all' in the security settings is not wise if it compromises security. But anyway thanks for all your efforts.
Wil D.
 
Posts: 2
Joined: 23. December 2008 13:27

Re: Xampp 1.7 security 403 error on vista

Postby okor » 24. December 2008 21:40

I also applied the solution from Wiedmann, by changing localhost to 127.0.01 where named and it worked perfectly.

Thank you for your help!

**Allowing access to all is a little crazy sounding even for a Dev box. Definitely DO NOT do that.**
okor
 
Posts: 1
Joined: 24. December 2008 21:35

Re: Xampp 1.7 security 403 error on vista

Postby Sharley » 25. December 2008 00:44

...I think I should not alter settings for IPV6 when not really necessary...
Apache does not parse IPv6 ::1 localhost only the IPv4 127.0.0.1 localhost that is why using the local loop back IP address 127.0.0.1 will work over using just the localhost name - so it is safe to either comment out the IPv6 localhost reference line or even to delete the line in total then Apache will use IPv4 as usual.

Using either of the above methods that work for you to fix the access issue is fine, except in other cases when localhost is specified in a script, configuration file or some other code that Apache has to deal with will the IPv6 localhost issue perhaps rear it's ugly head again.

It seems that Windows XP SP3, Windows Vista and possibly Windows XP SP2 have this IPv6 ::1 localhost line placed in the HOSTS file by default and in most, if not all, cases it is of no use whatsoever and can and has caused many issues with Apache that have resulted in many posts for a solution in these and many other server related forums on the Internet.

**Allowing access to all is a little crazy sounding even for a Dev box. Definitely DO NOT do that.**
Up to this latest 1.7 version of XAMPP this Allow from all has been the norm and so it has consequently been changed to be somewhat more secure and allow access only from the PC that XAMPP is installed on and is the reason for all these localhost (127.0.0.1) issues being raised.

The obvious conclusion to this change, one can assume, is that using localhost instead of 127.0.0.1, which by the way 127.0.0.1 is used in most if not all of the security related php files in the .\xampp\security\htdocs folder, was perhaps not extensively tested during beta in relation to more recent Windows OS's inclusion of the IPv6 entry in the HOSTS file - but keep in mind that the IPv6 issue may not be the only reason for this 403 access problem to be raised as I believe that in some other posts in the non English forums the commenting out of the IPv6 line had no effect on this issue at all and so the above solution to replace with 127.0.0.1 was the only solution anyway.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Xampp 1.7 security 403 error on vista

Postby chetdude » 31. December 2008 00:18

I've tried EVERYTHING mentioned in this thread and I'm getting an error message whenever I try to run:

http://localhost/security/xamppsecurity.php OR
http://127.0.0.1/security/xamppsecurity.php

"The connection to the server was reset while the page was loading"

I had NO trouble installing xampp and drupal on my Windows XP box but this Vista box has wasted about 6 horrible hours of my life so far and I can't even input a mysql password yet!!!

I've already put out a request for a copy of Windows XT to upgrade my little laptop from Vista so IT WILL WORK!!!

Vista is Sh*t... :evil: :evil:
chetdude
 
Posts: 1
Joined: 31. December 2008 00:12

Re: Xampp 1.7 security 403 error on vista

Postby Sharley » 31. December 2008 00:42

Are you logged in with full administrator permissions?

Is the server even running?

Can you get to the Welcome page at http://localhost or http://127.0.0.1/ ?

If you can, have you tried accessing the Security pages from the menu on the Welcome page?

"The connection to the server was reset while the page was loading"
Is this a browser error message?
Any better clues to this issue in the xampp\apache\logs\error.log or the other log files in there ?

...And I heartily agree about Vista (too restrictive for those used to the freedoms of XP) - reminds me of when MS brought out Windows ME, which failed and was replaced quickly by the successful NT based XP - so watch out for the next Windows 7 release to replace this equally failed nanny Vista (MS knows best what you should be doing).

But having said that, never let an OS beat you, always do the hard yards with Google as your issues will not be exclusive to your Vista installation. ;)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Xampp 1.7 security 403 error on vista

Postby al! » 08. April 2009 00:31

How to get access to the XAMPP Security Page

1. Navigate to your xampp\apache\conf\extra folder
2. Using a text editor, open httpd-xampp.conf
3. Find the following line:

Code: Select all
Allow from localhost


4. Change the line to:

Code: Select all
Allow from 127.0.0.1


There are 2 similiar lines - change only first line

5. Save the file and restart your XAMPP server
6. Try to access http://localhost/security/lang.php?en

I have found this at http://www.lancelhoff.com/xampp-access- ... rity-page/
al!
 
Posts: 3
Joined: 08. April 2009 00:28

Re: Xampp 1.7 security 403 error on vista

Postby Sharley » 08. April 2009 06:33

As posted above, had you read this topic in full before posting with your "find" (which more than likely came from the these forums originally) and in about 100 posts in these forums had you availed yourself of our wonderful forum search facility. :)

EDIT
BTW this is incorrect and should be ignored completely:
There are 2 similiar lines - change only first line

You must change both instances of Allow from localhost to Allow from 127.0.0.1 not just the one instance.
Last edited by Sharley on 11. April 2009 23:51, edited 1 time in total.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Xampp 1.7 security 403 error on vista

Postby kaserei » 11. April 2009 14:46

al! wrote:How to get access to the XAMPP Security Page

1. Navigate to your xampp\apache\conf\extra folder
2. Using a text editor, open httpd-xampp.conf
3. Find the following line:

Code: Select all
Allow from localhost


4. Change the line to:

Code: Select all
Allow from 127.0.0.1


There are 2 similiar lines - change only first line

5. Save the file and restart your XAMPP server
6. Try to access http://localhost/security/lang.php?en

I have found this at http://www.lancelhoff.com/xampp-access- ... rity-page/


After following the above, initially the settings worked fine. I then used the security review page and followed the link to set all the passwords as directed. Following this I restarted all servers including mySQL, and have encountered a new problem. The xampp homepage does not seem to be parsing php, the security page now shows the same issue as before and the PHP myAdmin pages are also not executing php code.

The lines altered above were not changed by the security script so I am at a loss to find any changes to httpd.conf or the include files.

Any ideas?

I am running xampp 1.7.0 on windows server2003 in o:\xampp. I used the windows msi package to install.

Thanks
kaserei
 
Posts: 1
Joined: 11. April 2009 14:31

Re: Xampp 1.7 security 403 error on vista

Postby elGales » 12. April 2009 21:29

May I add my thanks to Wiedmann and all concerned for helping solve what was otherwise proving to be a difficult and tedious problem.

Muchas Gracias!

el Galés
elGales
 
Posts: 1
Joined: 12. April 2009 21:19

Re: Xampp 1.7 security 403 error on vista

Postby Nathan2508 » 20. July 2010 19:26

I'm trying to install 1.7.3 but I can't access localhost. My server is running and IIS is enabled but when I enter http://localhost I get a 403 error. I tried the fixes mentioned above but didn't get anywhere. In my version of httpd-xampp.conf "Allow from localhost" is never used. The closest I could find was at the very end:

Code: Select all
#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Order deny,allow
    Deny from all
    Allow from ::1 127.0.0.0/8 \
               fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
               fe80::/10 169.254.0.0/16

    ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>


I'm new to xampp so be patient with me!
Nathan2508
 
Posts: 5
Joined: 12. July 2010 21:40

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 51 guests