What is this "Access forbidden problem "

Discussion in 'PHP' started by tanvirtonu, Oct 17, 2007.

  1. #1
    I just wan to write a simple programme which refresh the current page.But I get the following error message-

    "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.
    Error 403
    localhost
    10/17/07 19:38:49
    Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.3 "

    I wrote the code using DreamWeaver Web Editor.My code is as follows-

    php:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>REFRESHING Page</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>

    <form action="<?php echo $_SERVER[PHP_SELF] ?>" method="POST">

    <p> <strong>Type ur guess here</strong> <input type="text" name="guess"> </p>
    <p> <input type="submit" name="Submit" value="Submit ur guess"> </p>

    </form>
    </body>
    </html>





    PLs tell me what to do. I hav already run several other pages well.
     
    tanvirtonu, Oct 17, 2007 IP
  2. Lordy

    Lordy Peon

    Messages:
    1,643
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try chmoding the file, but for your form action, you need to fix it a bit
    <form action="<?=$_SERVER['PHP_SELF']?>" method="post">
    PHP:
     
    Lordy, Oct 17, 2007 IP
  3. tanvirtonu

    tanvirtonu Peon

    Messages:
    32
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Bro. what do u mean by "chmoding the file"
     
    tanvirtonu, Oct 18, 2007 IP
  4. Lordy

    Lordy Peon

    Messages:
    1,643
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #4
    CHMOD(change mode), set permissions, you can do that with an FTP or through your cpanel
     
    Lordy, Oct 18, 2007 IP
  5. webhost4u

    webhost4u Guest

    Messages:
    124
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Set permissions to 755
     
    webhost4u, Oct 18, 2007 IP
  6. tamen

    tamen Peon

    Messages:
    182
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I often get the problem if I download a script, unzip it and upload it to the server. Annoying, but if you change the permissions so every user can read the file, everything should be ok.
     
    tamen, Oct 19, 2007 IP
  7. jgjg

    jgjg Peon

    Messages:
    595
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I believe you can go to FTP mode in Dreamweaver, right click on a file, and change it's permissions. you can do the same with folders.
     
    jgjg, Oct 25, 2007 IP