tags:

views:

1516

answers:

3

I've been using xampp for a long time and it's always worked fine. I have a project I am currently working on and it was working fine just a couple of days ago. Now I am getting 403 Access forbidden page for any file that is not named index.php. Anyone have any ideas why this might be happening.

I'm on Windows XP and have Xampp Version 1.6.4 installed.

A: 

It sounds like you changed some mod_rewrite rules or your site's apache configuration. Did you add or change anything in an .htaccess file?

You're probably going to have to give more details in order to figure this out.

zombat
Hi zombat,I didn't touch the mod_rewrite and I don't have an .htaccess file.
Joe
How about providing more details about your set up then? Edit your question to add them.
zombat
A: 

My first guess would be an issue with the .htaccess file (or httpd.conf file).

Something to keep in mind:

The way that Apache handles .htaccess rules is "cascading" meaning that it will check every .htaccess file along the path of the file you are trying to access, so if you have some rule forbidding users from viewing any non-index files at any point, it will affect all deeper directories.

Having said that, if you know the issue isn't with the httpd.conf file, check to see if the root of the publishing path has a .htaccess file. Change it to .htaccessold and see if you can access any files in the htdocs directory other than index.

Two questions:

  1. Do you get this for all files, or just php files? can you see image files, etc?
  2. What about index.html? If you change your index.php to tempindex.php and create a new blah file called index.html can you see that?

Good luck. Keep me posted.

Anthony
Oh, and I just read your comment to zombat. You said that you don't have an htaccess file, which actually makes my point about them more relevant (but not necessarily to your problem). If you have ANY htaccess files along the path, it will affect that directory. So double check (a simple find should do it) that you didn't overlook one much higher in the path.
Anthony
Oh, and the config file is actually going to be called "httpd.conf" which I updated in my answer. If you go to your xampp directory, then `apache > conf` you'll find it there. Look for the term access or allow. Also, check that same directory for any other conf files that may suggest access rights.
Anthony
I'm glad my answer helped. Can you leave a comment on the specifics of the solution so I can brag to my friends?
Anthony
A: 

The only way you can see why Apache is returning this error message is to look at the error log.

We can guess at possible causes, but Apache will be able to tell you if you take the time to look.

Steve Kemp