Updated Xampp. Now I get Access forbidden.

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

Updated Xampp. Now I get Access forbidden.

Postby JohnRostron » 06. June 2016 15:33

I have just updated XAMPP to the most recent version, 5.6.21 from a much older version (2012). I had several Aliases in my conf file, all of which worked. I copied the Alias information from the old conf file to the new, but when I try to access these directories as before, I get a 403 Error:
"You don't have permission to access the requested object. It is either read-protected or not readable by the server."

I have scoured these and other forums, but nothing suggested there seems to help.

Any advice would be welcome.

John Rostron
JohnRostron
 
Posts: 6
Joined: 06. June 2016 15:07
XAMPP version: 5.6.21
Operating System: Windows 10

Re: Updated Xampp. Now I get Access forbidden.

Postby Altrea » 06. June 2016 22:12

Hi,

How did you "update" XAMPP? Please describe as detailed as possible.
Please tell us the config lines you transfered from the old one to the new.
And please give us some base information about your XAMPP installation (installation path for example)

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8297
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Updated Xampp. Now I get Access forbidden.

Postby gsmith » 07. June 2016 02:05

For every Alias that is outside the configured DocumentRoot, you need to use <Directory> containers for each and allow access to those directories on the server.

Like
Alias /something "/path/to/aliased/directory"
<Directory "/path/to/aliased/directory">
Options Options you want
AllowOverride any Overrides you want
Require all granted
</Directory>
gsmith
 
Posts: 194
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win XP to 2012R2/VS 6,9,11,14

Re: Updated Xampp. Now I get Access forbidden.

Postby JohnRostron » 07. June 2016 14:35

My original version of the Xampp Control Panel was 2.5, May 2007.
The current version is Xampp 5.6.21, the Control Panel is Version: 3.2.2 [ Compiled: Nov 12th 2015 ].
I downloaded the file xampp-win32-5.6.21-0-VC11-installer.exe on ‎June ‎6, ‎2016, ‏‎9:41:00 AM, from https://www.apachefriends.org/download.html

Tha Alias part of the current config is:

Alias /PoundWood "E:/PoundWood"

<Directory "E:/PoundWood">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Require all granted
</Directory>

The old config was:

Alias /poundwood/ "E:/poundwood/"

<Directory "E:/poundwood/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

I had renamed the directory to PoundWood from poundwood (although I understand that Windows in not case-sensitive). I had changed 'Allow from all' to 'Require all granted' following a suggestion in a forum post.

The installation path (then as now) is D:\Xampp.

I use Xampp as a testing server mainly for my Pound Wood website using PHP. I use it both from my browser (Chrome) and from Dreamweaver CC2015. (All of these worked previously).

John
JohnRostron
 
Posts: 6
Joined: 06. June 2016 15:07
XAMPP version: 5.6.21
Operating System: Windows 10

Re: Updated Xampp. Now I get Access forbidden.

Postby Nobbie » 07. June 2016 17:35

What is "E:" on your PC? Drive Letters do not work in many cases, as their scope is related to the current logged-in User. There are only some basic letters (like c:) that work for everybody. But if E: for example points to a Net Device, it is unknown to Windows Services, which (mostly) are executed by "System" User. So if you run Apache as Service (you did not tell us about that), E: might be unknown to Apache.
Nobbie
 
Posts: 8777
Joined: 09. March 2008 13:04

Re: Updated Xampp. Now I get Access forbidden.

Postby JohnRostron » 08. June 2016 10:29

Drive 'E:' is a partition on my hard disk. As I explained, this drive letter worked fine on the earlier version of Xampp/Apache. I have tried both 'E:/PoundWood/' and and 'E:/PoundWood' . Neither works.

Note that Xampp is installed on D: and the files in the DocumentRoot "D:/Xampp/htdocs" work OK.

If I cannot solve this problem, is there any reason why I should not revert to my original Xampp installation which did?

John
JohnRostron
 
Posts: 6
Joined: 06. June 2016 15:07
XAMPP version: 5.6.21
Operating System: Windows 10

Re: Updated Xampp. Now I get Access forbidden.

Postby Nobbie » 08. June 2016 10:52

JohnRostron wrote:As I explained, this drive letter worked fine on the earlier version of Xampp/Apache.


I know, but a letter is only a letter. It depends. whether it is a Partition (what you did not specify) or if it is a Network Node. Both can be E:, it even could be a Partition on your old environment and a NAS in your new environment - we do not know that, as you did not specify. Therefore i asked.

Anyway, a 403-Error is NOT a misconfiguration from Apache (like a missing Require clause or similar), it means instead, that Apache (which is run by a certain User, this depends on your installation, especially if you run Apache as a service or not) cannot read E:/.. due to Windows restrictions. The Windows rights management does not allow Apache (i.e. the User, which executes Apache) to read E:/...

In case of a service, mostly the "System" User executes Apache, this User has restricted rights (i.e. it does not have the same rights as your UserID).

You cannot solve this issue in httpd.conf or similar, it is an OS issue. You must grant access to E:/... for that "Apache User".
Nobbie
 
Posts: 8777
Joined: 09. March 2008 13:04

Re: Updated Xampp. Now I get Access forbidden.

Postby JohnRostron » 09. June 2016 09:31

I have to admit that although I am an experienced Widows user, my expertise does not extend to this sort of level. However, when I got this 403 error, the first thing I did was to look at the security permissions for E:. These are:

Administrators and SYSTEM: full control;
Authenticated Users: Modify;
Users: Read and Execute.

My limited understanding of this is that the necessary permissions are there.

Doing the same for E:\PoundWood, it gives Full Control to all of those listed above as well as 'Everyone'.

Should there be a distinct 'Apache User''? Entering this name in the box for adding users says that it does not exist. (Apache is currently running.) The Microsoft Object Picker UI (https://technet.microsoft.com/library/dn789205) is no help. It assumes that you know the name of the user.

The 403 Error message gives:
localhost
Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.21

John
JohnRostron
 
Posts: 6
Joined: 06. June 2016 15:07
XAMPP version: 5.6.21
Operating System: Windows 10

Re: Updated Xampp. Now I get Access forbidden.

Postby Nobbie » 09. June 2016 12:29

JohnRostron wrote:Should there be a distinct 'Apache User''?


No. Everything depends on the way you start Apache:

a) you start Apache by clicking the appropriate Option in the Xampp Dialogbox -> you (your UserID) are the User which runs the Apache process

b) you start Apache via "Run as service" -> Windows starts the Apache Process, usually with the System User. This can be modified in the Services Dialog of the Windows Setup.

It might be still possible, that E: is unknown to the User which runs Apache. I cannot help any further, i would have to sit in front of your PC for extended help. This is quite impossible via internet boards. You should also look into the Apache ErrorLog and AccessLog, this should give you an extended information of what is going wrong. There may also be a redirection which fails, your error descrtiption lacks information about which file cannot be found exactly (this *should* be described in the Log files more precisely).
Nobbie
 
Posts: 8777
Joined: 09. March 2008 13:04

Re: Updated Xampp. Now I get Access forbidden.

Postby JohnRostron » 09. June 2016 15:05

Firstly thanks for your efforts so far. I am beginning to get some understanding of these low-lever things.

I have just looked at the access and error logs, and I think that it would be better if I re-booted and cleared out these logs before trying again.

John
JohnRostron
 
Posts: 6
Joined: 06. June 2016 15:07
XAMPP version: 5.6.21
Operating System: Windows 10

Re: Updated Xampp. Now I get Access forbidden.

Postby JohnRostron » 11. June 2016 11:51

Thanks for your efforts, but I have decided to go back to my original Xampp version. I have uninstalled the new version, and copied back all my old saved 2012/2013 files into a new Xampp directory. Xampp now works, and will find my aliased locations with no trouble.

This is a pity as Xampp is touted as an easy-to use local host server, and if a new user has the same problems as I had, I'm sure that they would also give up. I did find that the new Control Panel interface was better. It allowed me to access configuration files from the interface. When I installed Xampp in 2013, as I recall, the only tweaking of the configuration I had to do was to tell it to listen to port 8080 instead of port 80, and to add my aliases.

John
JohnRostron
 
Posts: 6
Joined: 06. June 2016 15:07
XAMPP version: 5.6.21
Operating System: Windows 10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 51 guests