SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: 403 Forbidden

  1. #1
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    403 Forbidden

    I'm having trouble with my login and registration system. Everytime someone tries to login or register; they receive a 403 error. This is what I'm getting:

    Code:
    403 forbidden
    
    Server configuration does not allow access to this page. Please go back and try again.
    I'm using text files to store the account information; these text files are in a directory called info/. The text file name is "users.txt" and it's file permissions are 777; the folder has an .htaccess file denying access to all. This worked perfectly and nothing was wrong; anyone have any ideas? (hopefully this is where i should put this)

  2. #2
    Non-Member
    Join Date
    Feb 2006
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    of course you have to delet the .htaccess , if no one can access the directory , this mean that the script too , ll not access the directory !

    just delet the .htaccess , and all ll work fine

    the folder has an .htaccess file denying access to all.
    Mourad benzine

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes it seems like it's that easy, but this worked before even with the .htaccess there; so therefore ..it's not it, and if i delete the .htaccess it still doesn't work...

  4. #4
    SitePoint Evangelist superuser2's Avatar
    Join Date
    Aug 2006
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What are the permissions on the registration page?

    You need to make exceptions for pages that should be visible even when everything else is a 403 Forbidden or a 401 Unauthorized in your .htaccess file.

    When you say doesn't work, you mean you get a 403?

  5. #5
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I get a 403. The register.php and login.php 's are both 644

  6. #6
    Worship the Krome kromey's Avatar
    Join Date
    Sep 2006
    Location
    Fairbanks, AK
    Posts
    1,621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, help me out here - register.php and login.php are both in the directory that contains the .htaccess which denies all. Is this correct?

    If this is the case, then of course your users are getting 403 when they try to access those scripts! That's exactly what .htaccess does - it controls access to files in a directory. You have to either grant exceptions to those particular files, or you have to put them in an accessible directory (I'd recommend the latter).
    PHP questions? RTFM
    MySQL questions? RTFM

  7. #7
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no, login.php and register.php are both not in the directory with the .htaccess thats denying access to that folder; the users.txt file that is set to 777 and has a .htacess file denying all access is in a folder..this folder is called 'info'. This worked for me before; but for some reason im now getting this error.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •