SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Oct 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Access forbidden problem

    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 Code:

    <!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.
    Last edited by tanvirtonu; Oct 17, 2007 at 10:29. Reason: php tag not added

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)

    permissions

    Hi tanvirtonu, welcome to the forums
    You don't have permission to access the requested object. It is either read-protected or not readable by the server.
    This suggests the file's permissions aren't readable. eg.
    -rwxr--r--
    or
    744 or 0744

  3. #3
    SitePoint Member
    Join Date
    Oct 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague View Post
    Hi tanvirtonu, welcome to the forums
    This suggests the file's permissions aren't readable. eg.
    -rwxr--r--
    or
    744 or 0744

    Tell me how to permit the file pls.1 more thing if I save the file in .php format,it works well.

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)

    file

    I'm not sure what you mean by "PHP format". The file is a PHP file. Otherwise the server won't know what to do with
    PHP Code:
    <?php echo $_SERVER[PHP_SELF] ; ?>
    You should be able to set permission levels using your FTP app (under properties?) or through your site's control panel (file manager?).
    Permissions can be a bit tricky to understand at first, you don't want to create a vulnerability (eg. don't let the "world" write and execute!), so be careful.


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
  •