Problem in my Php coding

Discussion in 'PHP' started by one198, Aug 16, 2007.

  1. #1
    Hi guys

    I got problem once i run this page in my web browser.i installed apache 2.0.59 and php 5.0.0.iam using IE 6.0
    The error message is

    You don't have permission to access /project/< on this server.
    Error code Forbidden 403

     Html>
    <head>
      <link rel="stylesheet" type="text/css" href="cmt2060style2.css">
      <meta http-equiv="Content-Type"
     content="text/html; charset=iso-8859-1">
      <meta http-equiv="Cache-Control" content="private">
      <meta http-equiv="Pragma" content="no-cache">
      <meta http-equiv="Expires" content="-1">
      <meta http-equiv="Cache-Control" content="private">
      <meta http-equiv="Pragma" content="no-cache">
      <meta http-equiv="Expires" content="-1">
    </head>
    <body>
    
    <fieldset><legend><b>Welcome to the Student inforamtion management  Website</b></legend> 
    
    You should sign-up for this website
    by clicking register<br>
    as you will need access to the work/information here.
    
    <br>
    <br>
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
    
    Please enter your student number: <br>
      <input size="7" name="f_num" type="text"> <br>
      <br>
    Your password?
      <input size="10" maxlength="10" name="f_pass" type="password"><br>
      <br>
      <input name="choice" value="Login" type="submit">
      <input name="choice" value="Register" type="submit">
        </form>
      <br>
    <br>
    </fieldset>
    
    <?php
    if (isset($_POST['submit']))
    {
    	echo "Hello";
    //if (empty($_POST['f_num']))
    //{
    //$fn=FALSE;
    	//$messgae='<p>You forget to enter your name</p>';
    //}
    //else{
    //$fn=$_POST['f_num'];
    }
    ?>
    </body>
    </html>
    
    Code (markup):

    Pls help me

    Thank you
     
    one198, Aug 16, 2007 IP
  2. armoguy94

    armoguy94 Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try CHModding all directories to 777 (so everyone can see the directory and it won't show up as forbidden).

    EDIT: By the way, this is not an error in your PHP coding. The directory is just CHModded so only certain groups or people can access it.
     
    armoguy94, Aug 16, 2007 IP
  3. ehlokoen

    ehlokoen Peon

    Messages:
    161
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Or directory listing is not allowed. try yourdomain.com/folder/index.php
     
    ehlokoen, Aug 17, 2007 IP
  4. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #4
    Didn't anyone think the directory name "<" is just a tad suspicious?

    Possibly related, the HTML is missing the first "<" in "html>" :D

    one198, what is your server's document root, e.g. C:\apache\htdocs\

    It would be in httpd.conf (search for the file if you need to)

    Also, what is the URL you are using to access the page on your server?
     
    krt, Aug 17, 2007 IP
  5. supperman

    supperman Peon

    Messages:
    22
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    a 403 error,

    check your .htaccess,do you have it?
    if yes,please post here,maybe not allowed in .htaccess
     
    supperman, Aug 17, 2007 IP