#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2008
    Posts
    22
    Rep Power
    0

    Arrow What is "HTTP Error: 411 Length Required"?


    Hi all,

    When I'm using 'post' method to process a file, the phone browser display "HTTP Error: 411 Length Required" and can't proceed. So, I tried another files which it tested work fine before and now it also result the same error message. I've been googling around but there is no specific answer for me. Anyone here know how to solve it? And what causes this actually? Thank you

    password.php
    Code:
    <?php
    
    ?>
    <?xml version="1.0"?> 
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"  
    "http://www.wapforum.org/DTD/wml_1.1.xml">
     
    <wml>
    <card id="card1" title="Login">
    <p mode="wrap">
    
    Enter username and password to log in.<br/>
    Username
    <input name="username" type="text"></input><br/>
    Password
    <input name="password" type="password"></input>
    
    <do type="accept" label="Login"> 
    <go href="password2.php" method="post"> 
    </go> 
    </do>
    </p>
    </card>
    
    </wml>
    passpord2.php
    Code:
    <?php
    
    ?>
    <?xml version="1.0"?> 
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"  
    "http://www.wapforum.org/DTD/wml_1.1.xml">
    
    <wml>
    <card id="card2" title="Welcome">
    
    <?php
    //print_r($_POST);
    
    $username = $_POST['username'];
    $password = $_POST['password'];
    echo $username;
    echo $password;
    $HitError = "false";
    
    if (empty ($username))
    {
    echo ("You did not enter a username, please go back and try again.<br>");
    $HitError = "true";
    }
    ?>
    
    </card>
    </wml>
  2. #2
  3. Retired
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Finland
    Posts
    9,143
    Rep Power
    2493
    It is because you are not posting anything.
    In your login page you need to add something like:[php=snippet]<?php
    // your other code
    <do type="accept" label="Login">
    <go href="password2.php" method="post">
    <postfield name="password" value="$(password)"/>
    <postfield name="username" value="$(username)"/>
    </go> [/php]

    Cheers,
    Jamie

    >_ skiFFie ? | Twitter

    __________________

    Let the might of your compassion arise to bring a quick end
    to the flowing stream of the blood and tears .....
    Please hear my anguished words of truth.

    __________________
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2008
    Posts
    22
    Rep Power
    0

    Smile


    I just add on the missing code:
    Code:
    <postfield name="password" value="$(password)"/> 
    <postfield name="username" value="$(username)"/>
    but the HTTP error still the same. So i tested it on Nokia Phone Browser 4.0, it somehow cant even connect to internet. Then i tried it on WinWap, but i found that it wasnt user friendly at all. Then i uninstalled Openwave Phone Browser 6.0 and reinstall with 7.0 which is the latest version. And it works fine. I think it could be the bugs or something, coz no matter the extra codes are add on or not, it still works fine. Thank you again for your big help, jabba_29

IMN logo majestic logo threadwatch logo seochat tools logo