Loading ...
Sorry, an error occurred while loading the content.

Re: [wmlprogramming] debugging dynamic page errors

Expand Messages
  • Kevin Carlson
    Thanks for the tips! I made the recommended changes, and found that the page looks fine using Opera but still gives the same error message on my cell phone.
    Message 1 of 11 , Jul 31, 2006
    • 0 Attachment
      Thanks for the tips! I made the recommended changes, and found that the page looks fine using Opera but still gives the same error message on my cell phone.

      Anyone else having problems with the SonyEricsson J220a?
      (The manufacturer's literature does recommend using WML).

      Thanks,
      Kevin



      Patrik Buckau <patrik@...> wrote: Also I would suggest not making a blank line before the XML declaration.
      Not that I know of a specific browser that chokes on it. Just out of
      precaution.

      Cheers,
      Patrik

      Marten van Wezel wrote:
      > Im surprised the device simulator doesn't complain about your code cause
      > it's indeed wrong =) (and some XHTML/WML parsers expect 100% correct
      > code.
      >
      > Tip: try to use Opera to check your page.
      >
      > I'm sure it'll complain that you don't have an opening <b> on or before
      > line "echo "Inventory Report <br /> " . date('l dS \of F Y') . "</b> <br /> <br />";" which contains a closing </b>".
      >
      >
      >
      > On Sun, Jul 30, 2006 at 10:31:25PM -0700, Kevin Carlson wrote:
      >> Hello,
      >>
      >> I'm developing a dynamic WML application using PHP/MySQL.
      >> When testing on the Openwave 7.0 Generic Device simulator, it always runs great.
      >> However, with my Sony Ericsson J220a phone and some scripts I get the unhelpful message "The requested page cannot be displayed".
      >>
      >> (Note that with some dynamic scripts, the script runs fine on the J220a.)
      >>
      >> Below is a short sample script that gives the above error message when the while loop code is included (otherwise, it runs fine and correctly outputs the "Inventory Report" echo statement.).
      >> Any suggestions for debugging the script?
      >>
      >> Thanks!
      >> Kevin
      >>
      >>
      >> <?php
      >> header("content-type: text/vnd.wap.wml; charset=iso-8859-1");
      >> header("Cache-Control: no-cache");
      >> header("Pragma: no-cache");
      >>
      >> echo '<?xml version="1.0"?>';
      >> ?>
      >>
      >> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
      >> <wml>
      >> <card id="card1" title="Demo">
      >> <p>
      >>
      >> <?php
      >> echo "Inventory Report <br /> " . date('l dS \of F Y') . "</b> <br /> <br />";
      >> ?>
      >>
      >> </p>
      >>
      >> <?php
      >>
      >> $conn = @ mysql_connect("db", "username", "password");
      >>
      >> if (!$conn) {
      >> echo "Unable to connect to DB: " . mysql_error();
      >> exit;
      >> }
      >>
      >> if (! @mysql_select_db("production", $conn)) {
      >> echo "Unable to select database: " . mysql_error();
      >> exit;
      >> }
      >>
      >> $sql = "select mfgyear, make_text, model_text, extcolor ";
      >> $sql .= " from inventory ";
      >> $sql .= " where sell_date is null order by make_text, model_text, mfgyear desc";
      >>
      >> $result = mysql_query($sql);
      >>
      >> while ($row = mysql_fetch_assoc($result)) {
      >> // split out the associative array into separate variables
      >> extract($row);
      >>
      >> echo $extcolor . " " . $mfgyear . " " . $make_text . " " . $model_text . "<br />";
      >> }
      >>
      >> ?>
      >>
      >> </card>
      >> </wml>
      >>
      >>
      >>
      >> ---------------------------------
      >> See the all-new, redesigned Yahoo.com. Check it out.
      >>
      >> [Non-text portions of this message have been removed]
      >>
      >>
      >>
      >
      >
      >
      > As of July 14 2005, it's much easier to be banned from WMLProgramming!
      > Please fail to read http://groups.yahoo.com/group/wmlprogramming/ before you post.
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >






      ---------------------------------
      Do you Yahoo!?
      Next-gen email? Have it all with the all-new Yahoo! Mail Beta.

      [Non-text portions of this message have been removed]
    • Paschal Nee
      You d have more chance of getting some help here if you posted a URL to the page (may be difficult admittedly) or a URL to the outputted WML page (should be
      Message 2 of 11 , Aug 1, 2006
      • 0 Attachment
        You'd have more chance of getting some help here if you posted a URL to the
        page (may be difficult admittedly) or a URL to the outputted WML page
        (should be easy to do).

        Regardless, my guess is that your problem is the text that you are
        outputting to the phone is not enclosed in any <p> tag. Try wrap that text
        in a <p> tag and let us know how you get on.

        Thanks,
        Paschal.

        On 01/08/06, Kevin Carlson <kevinlcarlson@...> wrote:
        >
        > Thanks for the tips! I made the recommended changes, and found that the
        > page looks fine using Opera but still gives the same error message on my
        > cell phone.
        >
        > Anyone else having problems with the SonyEricsson J220a?
        > (The manufacturer's literature does recommend using WML).
        >
        > Thanks,
        > Kevin
        >
        > Patrik Buckau <patrik@... <patrik%40buckau.se>> wrote: Also I would
        > suggest not making a blank line before the XML declaration.
        > Not that I know of a specific browser that chokes on it. Just out of
        > precaution.
        >
        > Cheers,
        > Patrik
        >
        > Marten van Wezel wrote:
        > > Im surprised the device simulator doesn't complain about your code cause
        > > it's indeed wrong =) (and some XHTML/WML parsers expect 100% correct
        > > code.
        > >
        > > Tip: try to use Opera to check your page.
        > >
        > > I'm sure it'll complain that you don't have an opening <b> on or before
        > > line "echo "Inventory Report <br /> " . date('l dS \of F Y') . "</b> <br
        > /> <br />";" which contains a closing </b>".
        > >
        > >
        > >
        > > On Sun, Jul 30, 2006 at 10:31:25PM -0700, Kevin Carlson wrote:
        > >> Hello,
        > >>
        > >> I'm developing a dynamic WML application using PHP/MySQL.
        > >> When testing on the Openwave 7.0 Generic Device simulator, it always
        > runs great.
        > >> However, with my Sony Ericsson J220a phone and some scripts I get the
        > unhelpful message "The requested page cannot be displayed".
        > >>
        > >> (Note that with some dynamic scripts, the script runs fine on the
        > J220a.)
        > >>
        > >> Below is a short sample script that gives the above error message when
        > the while loop code is included (otherwise, it runs fine and correctly
        > outputs the "Inventory Report" echo statement.).
        > >> Any suggestions for debugging the script?
        > >>
        > >> Thanks!
        > >> Kevin
        > >>
        > >>
        > >> <?php
        > >> header("content-type: text/vnd.wap.wml; charset=iso-8859-1");
        > >> header("Cache-Control: no-cache");
        > >> header("Pragma: no-cache");
        > >>
        > >> echo '<?xml version="1.0"?>';
        > >> ?>
        > >>
        > >> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "
        > http://www.wapforum.org/DTD/wml13.dtd">
        > >> <wml>
        > >> <card id="card1" title="Demo">
        > >> <p>
        > >>
        > >> <?php
        > >> echo "Inventory Report <br /> " . date('l dS \of F Y') . "</b> <br />
        > <br />";
        > >> ?>
        > >>
        > >> </p>
        > >>
        > >> <?php
        > >>
        > >> $conn = @ mysql_connect("db", "username", "password");
        > >>
        > >> if (!$conn) {
        > >> echo "Unable to connect to DB: " . mysql_error();
        > >> exit;
        > >> }
        > >>
        > >> if (! @mysql_select_db("production", $conn)) {
        > >> echo "Unable to select database: " . mysql_error();
        > >> exit;
        > >> }
        > >>
        > >> $sql = "select mfgyear, make_text, model_text, extcolor ";
        > >> $sql .= " from inventory ";
        > >> $sql .= " where sell_date is null order by make_text, model_text,
        > mfgyear desc";
        > >>
        > >> $result = mysql_query($sql);
        > >>
        > >> while ($row = mysql_fetch_assoc($result)) {
        > >> // split out the associative array into separate variables
        > >> extract($row);
        > >>
        > >> echo $extcolor . " " . $mfgyear . " " . $make_text . " " . $model_text
        > . "<br />";
        > >> }
        > >>
        > >> ?>
        > >>
        > >> </card>
        > >> </wml>
        > >>
        > >>
        > >>
        > >> ---------------------------------
        > >> See the all-new, redesigned Yahoo.com. Check it out.
        > >>
        > >> [Non-text portions of this message have been removed]
        > >>
        > >>
        > >>
        > >
        > >
        > >
        > > As of July 14 2005, it's much easier to be banned from WMLProgramming!
        > > Please fail to read http://groups.yahoo.com/group/wmlprogramming/ before
        > you post.
        > > Yahoo! Groups Links
        > >
        > >
        > >
        > >
        > >
        > >
        > >
        >
        >
        >
        >
        >
        >
        > ---------------------------------
        > Do you Yahoo!?
        > Next-gen email? Have it all with the all-new Yahoo! Mail Beta.
        >
        > [Non-text portions of this message have been removed]
        >
        >
        >


        [Non-text portions of this message have been removed]
      • ALEX HYDE
        Kevin, Try stripping nearly everything out of the page and start from the ground up again. Kevin Carlson wrote:
        Message 3 of 11 , Aug 1, 2006
        • 0 Attachment
          Kevin,

          Try stripping nearly everything out of the page and start from the ground up again.

          Kevin Carlson <kevinlcarlson@...> wrote: Thanks for the tips! I made the recommended changes, and found that the page looks fine using Opera but still gives the same error message on my cell phone.

          Anyone else having problems with the SonyEricsson J220a?
          (The manufacturer's literature does recommend using WML).

          Thanks,
          Kevin

          Patrik Buckau <patrik@...> wrote: Also I would suggest not making a blank line before the XML declaration.
          Not that I know of a specific browser that chokes on it. Just out of
          precaution.

          Cheers,
          Patrik

          Marten van Wezel wrote:
          > Im surprised the device simulator doesn't complain about your code cause
          > it's indeed wrong =) (and some XHTML/WML parsers expect 100% correct
          > code.
          >
          > Tip: try to use Opera to check your page.
          >
          > I'm sure it'll complain that you don't have an opening <b> on or before
          > line "echo "Inventory Report <br /> " . date('l dS \of F Y') . "</b> <br /> <br />";" which contains a closing </b>".
          >
          >
          >
          > On Sun, Jul 30, 2006 at 10:31:25PM -0700, Kevin Carlson wrote:
          >> Hello,
          >>
          >> I'm developing a dynamic WML application using PHP/MySQL.
          >> When testing on the Openwave 7.0 Generic Device simulator, it always runs great.
          >> However, with my Sony Ericsson J220a phone and some scripts I get the unhelpful message "The requested page cannot be displayed".
          >>
          >> (Note that with some dynamic scripts, the script runs fine on the J220a.)
          >>
          >> Below is a short sample script that gives the above error message when the while loop code is included (otherwise, it runs fine and correctly outputs the "Inventory Report" echo statement.).
          >> Any suggestions for debugging the script?
          >>
          >> Thanks!
          >> Kevin
          >>
          >>
          >> <?php
          >> header("content-type: text/vnd.wap.wml; charset=iso-8859-1");
          >> header("Cache-Control: no-cache");
          >> header("Pragma: no-cache");
          >>
          >> echo '<?xml version="1.0"?>';
          >> ?>
          >>
          >> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
          >> <wml>
          >> <card id="card1" title="Demo">
          >> <p>
          >>
          >> <?php
          >> echo "Inventory Report <br /> " . date('l dS \of F Y') . "</b> <br /> <br />";
          >> ?>
          >>
          >> </p>
          >>
          >> <?php
          >>
          >> $conn = @ mysql_connect("db", "username", "password");
          >>
          >> if (!$conn) {
          >> echo "Unable to connect to DB: " . mysql_error();
          >> exit;
          >> }
          >>
          >> if (! @mysql_select_db("production", $conn)) {
          >> echo "Unable to select database: " . mysql_error();
          >> exit;
          >> }
          >>
          >> $sql = "select mfgyear, make_text, model_text, extcolor ";
          >> $sql .= " from inventory ";
          >> $sql .= " where sell_date is null order by make_text, model_text, mfgyear desc";
          >>
          >> $result = mysql_query($sql);
          >>
          >> while ($row = mysql_fetch_assoc($result)) {
          >> // split out the associative array into separate variables
          >> extract($row);
          >>
          >> echo $extcolor . " " . $mfgyear . " " . $make_text . " " . $model_text . "<br />";
          >> }
          >>
          >> ?>
          >>
          >> </card>
          >> </wml>
          >>
          >>
          >>
          >> ---------------------------------
          >> See the all-new, redesigned Yahoo.com. Check it out.
          >>
          >> [Non-text portions of this message have been removed]
          >>
          >>
          >>
          >
          >
          >
          > As of July 14 2005, it's much easier to be banned from WMLProgramming!
          > Please fail to read http://groups.yahoo.com/group/wmlprogramming/ before you post.
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
          >






          ---------------------------------
          Do you Yahoo!?
          Next-gen email? Have it all with the all-new Yahoo! Mail Beta.

          [Non-text portions of this message have been removed]






          ---------------------------------
          All New Yahoo! Mail – Tired of Vi@gr@! come-ons? Let our SpamGuard protect you.

          [Non-text portions of this message have been removed]
        • Marten van Wezel
          While Opera might not be perfect, it is pretty good at spotting XML errors, and phones usually just choke at bad XML not at XML tags they don t recognise
          Message 4 of 11 , Aug 1, 2006
          • 0 Attachment
            While Opera might not be perfect, it is pretty good at spotting XML
            errors, and phones usually just choke at 'bad XML' not at 'XML tags they
            don't recognise (they just ignore those)'.

            Putting these two together brings me at one question:

            Is your server serving the right content type?

            If opera gets told 'the following is HTML' then it'll be lax about
            errors. If it gets told 'this is XML' it'll complain loudly.

            Also, it wouldn't surprise me if your phone would refuse non-XML content
            types!

            -M

            On Tue, Aug 01, 2006 at 09:50:42AM +0100, Paschal Nee wrote:
            > You'd have more chance of getting some help here if you posted a URL to the
            > page (may be difficult admittedly) or a URL to the outputted WML page
            > (should be easy to do).
            >
            > Regardless, my guess is that your problem is the text that you are
            > outputting to the phone is not enclosed in any <p> tag. Try wrap that text
            > in a <p> tag and let us know how you get on.
            >
            > Thanks,
            > Paschal.
            >
            > On 01/08/06, Kevin Carlson <kevinlcarlson@...> wrote:
            > >
            > > Thanks for the tips! I made the recommended changes, and found that the
            > > page looks fine using Opera but still gives the same error message on my
            > > cell phone.
            > >
            > > Anyone else having problems with the SonyEricsson J220a?
            > > (The manufacturer's literature does recommend using WML).
            > >
            > > Thanks,
            > > Kevin
            > >
            > > Patrik Buckau <patrik@... <patrik%40buckau.se>> wrote: Also I would
            > > suggest not making a blank line before the XML declaration.
            > > Not that I know of a specific browser that chokes on it. Just out of
            > > precaution.
            > >
            > > Cheers,
            > > Patrik
            > >
            > > Marten van Wezel wrote:
            > > > Im surprised the device simulator doesn't complain about your code cause
            > > > it's indeed wrong =) (and some XHTML/WML parsers expect 100% correct
            > > > code.
            > > >
            > > > Tip: try to use Opera to check your page.
            > > >
            > > > I'm sure it'll complain that you don't have an opening <b> on or before
            > > > line "echo "Inventory Report <br /> " . date('l dS \of F Y') . "</b> <br
            > > /> <br />";" which contains a closing </b>".
            > > >
            > > >
            > > >
            > > > On Sun, Jul 30, 2006 at 10:31:25PM -0700, Kevin Carlson wrote:
            > > >> Hello,
            > > >>
            > > >> I'm developing a dynamic WML application using PHP/MySQL.
            > > >> When testing on the Openwave 7.0 Generic Device simulator, it always
            > > runs great.
            > > >> However, with my Sony Ericsson J220a phone and some scripts I get the
            > > unhelpful message "The requested page cannot be displayed".
            > > >>
            > > >> (Note that with some dynamic scripts, the script runs fine on the
            > > J220a.)
            > > >>
            > > >> Below is a short sample script that gives the above error message when
            > > the while loop code is included (otherwise, it runs fine and correctly
            > > outputs the "Inventory Report" echo statement.).
            > > >> Any suggestions for debugging the script?
            > > >>
            > > >> Thanks!
            > > >> Kevin
            > > >>
            > > >>
            > > >> <?php
            > > >> header("content-type: text/vnd.wap.wml; charset=iso-8859-1");
            > > >> header("Cache-Control: no-cache");
            > > >> header("Pragma: no-cache");
            > > >>
            > > >> echo '<?xml version="1.0"?>';
            > > >> ?>
            > > >>
            > > >> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "
            > > http://www.wapforum.org/DTD/wml13.dtd">
            > > >> <wml>
            > > >> <card id="card1" title="Demo">
            > > >> <p>
            > > >>
            > > >> <?php
            > > >> echo "Inventory Report <br /> " . date('l dS \of F Y') . "</b> <br />
            > > <br />";
            > > >> ?>
            > > >>
            > > >> </p>
            > > >>
            > > >> <?php
            > > >>
            > > >> $conn = @ mysql_connect("db", "username", "password");
            > > >>
            > > >> if (!$conn) {
            > > >> echo "Unable to connect to DB: " . mysql_error();
            > > >> exit;
            > > >> }
            > > >>
            > > >> if (! @mysql_select_db("production", $conn)) {
            > > >> echo "Unable to select database: " . mysql_error();
            > > >> exit;
            > > >> }
            > > >>
            > > >> $sql = "select mfgyear, make_text, model_text, extcolor ";
            > > >> $sql .= " from inventory ";
            > > >> $sql .= " where sell_date is null order by make_text, model_text,
            > > mfgyear desc";
            > > >>
            > > >> $result = mysql_query($sql);
            > > >>
            > > >> while ($row = mysql_fetch_assoc($result)) {
            > > >> // split out the associative array into separate variables
            > > >> extract($row);
            > > >>
            > > >> echo $extcolor . " " . $mfgyear . " " . $make_text . " " . $model_text
            > > . "<br />";
            > > >> }
            > > >>
            > > >> ?>
            > > >>
            > > >> </card>
            > > >> </wml>
            > > >>
            > > >>
            > > >>
            > > >> ---------------------------------
            > > >> See the all-new, redesigned Yahoo.com. Check it out.
            > > >>
            > > >> [Non-text portions of this message have been removed]
            > > >>
            > > >>
            > > >>
            > > >
            > > >
            > > >
            > > > As of July 14 2005, it's much easier to be banned from WMLProgramming!
            > > > Please fail to read http://groups.yahoo.com/group/wmlprogramming/ before
            > > you post.
            > > > Yahoo! Groups Links
            > > >
            > > >
            > > >
            > > >
            > > >
            > > >
            > > >
            > >
            > >
            > >
            > >
            > >
            > >
            > > ---------------------------------
            > > Do you Yahoo!?
            > > Next-gen email? Have it all with the all-new Yahoo! Mail Beta.
            > >
            > > [Non-text portions of this message have been removed]
            > >
            > >
            > >
            >
            >
            > [Non-text portions of this message have been removed]
            >
          • Kevin Carlson
            Well, adding the tag did fix the problem! I hadn t realized that this tag was required for all output in WML... still learning! Thanks, Kevin Paschal Nee
            Message 5 of 11 , Aug 2, 2006
            • 0 Attachment
              Well, adding the <p> tag did fix the problem!
              I hadn't realized that this tag was required for all output in WML... still learning!

              Thanks,
              Kevin


              Paschal Nee <pnee@...> wrote: You'd have more chance of getting some help here if you posted a URL to the
              page (may be difficult admittedly) or a URL to the outputted WML page
              (should be easy to do).

              Regardless, my guess is that your problem is the text that you are
              outputting to the phone is not enclosed in any <p> tag. Try wrap that text
              in a <p> tag and let us know how you get on.

              Thanks,
              Paschal.

              On 01/08/06, Kevin Carlson <kevinlcarlson@...> wrote:
              >
              > Thanks for the tips! I made the recommended changes, and found that the
              > page looks fine using Opera but still gives the same error message on my
              > cell phone.
              >
              > Anyone else having problems with the SonyEricsson J220a?
              > (The manufacturer's literature does recommend using WML).
              >
              > Thanks,
              > Kevin
              >
              > Patrik Buckau <patrik@... <patrik%40buckau.se>> wrote: Also I would
              > suggest not making a blank line before the XML declaration.
              > Not that I know of a specific browser that chokes on it. Just out of
              > precaution.
              >
              > Cheers,
              > Patrik
              >
              > Marten van Wezel wrote:
              > > Im surprised the device simulator doesn't complain about your code cause
              > > it's indeed wrong =) (and some XHTML/WML parsers expect 100% correct
              > > code.
              > >
              > > Tip: try to use Opera to check your page.
              > >
              > > I'm sure it'll complain that you don't have an opening <b> on or before
              > > line "echo "Inventory Report <br /> " . date('l dS \of F Y') . "</b> <br
              > /> <br />";" which contains a closing </b>".
              > >
              > >
              > >
              > > On Sun, Jul 30, 2006 at 10:31:25PM -0700, Kevin Carlson wrote:
              > >> Hello,
              > >>
              > >> I'm developing a dynamic WML application using PHP/MySQL.
              > >> When testing on the Openwave 7.0 Generic Device simulator, it always
              > runs great.
              > >> However, with my Sony Ericsson J220a phone and some scripts I get the
              > unhelpful message "The requested page cannot be displayed".
              > >>
              > >> (Note that with some dynamic scripts, the script runs fine on the
              > J220a.)
              > >>
              > >> Below is a short sample script that gives the above error message when
              > the while loop code is included (otherwise, it runs fine and correctly
              > outputs the "Inventory Report" echo statement.).
              > >> Any suggestions for debugging the script?
              > >>
              > >> Thanks!
              > >> Kevin
              > >>
              > >>
              > >> <?php
              > >> header("content-type: text/vnd.wap.wml; charset=iso-8859-1");
              > >> header("Cache-Control: no-cache");
              > >> header("Pragma: no-cache");
              > >>
              > >> echo '<?xml version="1.0"?>';
              > >> ?>
              > >>
              > >> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "
              > http://www.wapforum.org/DTD/wml13.dtd">
              > >> <wml>
              > >> <card id="card1" title="Demo">
              > >> <p>
              > >>
              > >> <?php
              > >> echo "Inventory Report <br /> " . date('l dS \of F Y') . "</b> <br />
              > <br />";
              > >> ?>
              > >>
              > >> </p>
              > >>
              > >> <?php
              > >>
              > >> $conn = @ mysql_connect("db", "username", "password");
              > >>
              > >> if (!$conn) {
              > >> echo "Unable to connect to DB: " . mysql_error();
              > >> exit;
              > >> }
              > >>
              > >> if (! @mysql_select_db("production", $conn)) {
              > >> echo "Unable to select database: " . mysql_error();
              > >> exit;
              > >> }
              > >>
              > >> $sql = "select mfgyear, make_text, model_text, extcolor ";
              > >> $sql .= " from inventory ";
              > >> $sql .= " where sell_date is null order by make_text, model_text,
              > mfgyear desc";
              > >>
              > >> $result = mysql_query($sql);
              > >>
              > >> while ($row = mysql_fetch_assoc($result)) {
              > >> // split out the associative array into separate variables
              > >> extract($row);
              > >>
              > >> echo $extcolor . " " . $mfgyear . " " . $make_text . " " . $model_text
              > . "<br />";
              > >> }
              > >>
              > >> ?>
              > >>
              > >> </card>
              > >> </wml>
              > >>
              > >>
              > >>
              > >> ---------------------------------
              > >> See the all-new, redesigned Yahoo.com. Check it out.
              > >>
              > >> [Non-text portions of this message have been removed]
              > >>
              > >>
              > >>
              > >
              > >
              > >
              > > As of July 14 2005, it's much easier to be banned from WMLProgramming!
              > > Please fail to read http://groups.yahoo.com/group/wmlprogramming/ before
              > you post.
              > > Yahoo! Groups Links
              > >
              > >
              > >
              > >
              > >
              > >
              > >
              >
              >
              >
              >
              >
              >
              > ---------------------------------
              > Do you Yahoo!?
              > Next-gen email? Have it all with the all-new Yahoo! Mail Beta.
              >
              > [Non-text portions of this message have been removed]
              >
              >
              >

              [Non-text portions of this message have been removed]






              ---------------------------------
              Yahoo! Music Unlimited - Access over 1 million songs.Try it free.

              [Non-text portions of this message have been removed]
            • Kevin Carlson
              My understanding is that the PHP code: header( content-type: text/vnd.wap.wml; charset=iso-8859-1 ); causes the phone to treat the contents as WML, even though
              Message 6 of 11 , Aug 2, 2006
              • 0 Attachment
                My understanding is that the PHP code:

                header("content-type: text/vnd.wap.wml; charset=iso-8859-1");

                causes the phone to treat the contents as WML, even though the source code file has a .php extension.

                Agreed, my cheapie phone probably doesn't understand HTML - it's no Blackberry! ;)

                Thanks for your input,
                Kevin


                Marten van Wezel <marten@...> wrote: While Opera might not be perfect, it is pretty good at spotting XML
                errors, and phones usually just choke at 'bad XML' not at 'XML tags they
                don't recognise (they just ignore those)'.

                Putting these two together brings me at one question:

                Is your server serving the right content type?

                If opera gets told 'the following is HTML' then it'll be lax about
                errors. If it gets told 'this is XML' it'll complain loudly.

                Also, it wouldn't surprise me if your phone would refuse non-XML content
                types!

                -M

                On Tue, Aug 01, 2006 at 09:50:42AM +0100, Paschal Nee wrote:
                > You'd have more chance of getting some help here if you posted a URL to the
                > page (may be difficult admittedly) or a URL to the outputted WML page
                > (should be easy to do).
                >
                > Regardless, my guess is that your problem is the text that you are
                > outputting to the phone is not enclosed in any <p> tag. Try wrap that text
                > in a <p> tag and let us know how you get on.
                >
                > Thanks,
                > Paschal.
                >
                > On 01/08/06, Kevin Carlson <kevinlcarlson@...> wrote:
                > >
                > > Thanks for the tips! I made the recommended changes, and found that the
                > > page looks fine using Opera but still gives the same error message on my
                > > cell phone.
                > >
                > > Anyone else having problems with the SonyEricsson J220a?
                > > (The manufacturer's literature does recommend using WML).
                > >
                > > Thanks,
                > > Kevin
                > >
                > > Patrik Buckau <patrik@... <patrik%40buckau.se>> wrote: Also I would
                > > suggest not making a blank line before the XML declaration.
                > > Not that I know of a specific browser that chokes on it. Just out of
                > > precaution.
                > >
                > > Cheers,
                > > Patrik
                > >
                > > Marten van Wezel wrote:
                > > > Im surprised the device simulator doesn't complain about your code cause
                > > > it's indeed wrong =) (and some XHTML/WML parsers expect 100% correct
                > > > code.
                > > >
                > > > Tip: try to use Opera to check your page.
                > > >
                > > > I'm sure it'll complain that you don't have an opening <b> on or before
                > > > line "echo "Inventory Report <br /> " . date('l dS \of F Y') . "</b> <br
                > > /> <br />";" which contains a closing </b>".
                > > >
                > > >
                > > >
                > > > On Sun, Jul 30, 2006 at 10:31:25PM -0700, Kevin Carlson wrote:
                > > >> Hello,
                > > >>
                > > >> I'm developing a dynamic WML application using PHP/MySQL.
                > > >> When testing on the Openwave 7.0 Generic Device simulator, it always
                > > runs great.
                > > >> However, with my Sony Ericsson J220a phone and some scripts I get the
                > > unhelpful message "The requested page cannot be displayed".
                > > >>
                > > >> (Note that with some dynamic scripts, the script runs fine on the
                > > J220a.)
                > > >>
                > > >> Below is a short sample script that gives the above error message when
                > > the while loop code is included (otherwise, it runs fine and correctly
                > > outputs the "Inventory Report" echo statement.).
                > > >> Any suggestions for debugging the script?
                > > >>
                > > >> Thanks!
                > > >> Kevin
                > > >>
                > > >>
                > > >> <?php
                > > >> header("content-type: text/vnd.wap.wml; charset=iso-8859-1");
                > > >> header("Cache-Control: no-cache");
                > > >> header("Pragma: no-cache");
                > > >>
                > > >> echo '<?xml version="1.0"?>';
                > > >> ?>
                > > >>
                > > >> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "
                > > http://www.wapforum.org/DTD/wml13.dtd">
                > > >> <wml>
                > > >> <card id="card1" title="Demo">
                > > >> <p>
                > > >>
                > > >> <?php
                > > >> echo "Inventory Report <br /> " . date('l dS \of F Y') . "</b> <br />
                > > <br />";
                > > >> ?>
                > > >>
                > > >> </p>
                > > >>
                > > >> <?php
                > > >>
                > > >> $conn = @ mysql_connect("db", "username", "password");
                > > >>
                > > >> if (!$conn) {
                > > >> echo "Unable to connect to DB: " . mysql_error();
                > > >> exit;
                > > >> }
                > > >>
                > > >> if (! @mysql_select_db("production", $conn)) {
                > > >> echo "Unable to select database: " . mysql_error();
                > > >> exit;
                > > >> }
                > > >>
                > > >> $sql = "select mfgyear, make_text, model_text, extcolor ";
                > > >> $sql .= " from inventory ";
                > > >> $sql .= " where sell_date is null order by make_text, model_text,
                > > mfgyear desc";
                > > >>
                > > >> $result = mysql_query($sql);
                > > >>
                > > >> while ($row = mysql_fetch_assoc($result)) {
                > > >> // split out the associative array into separate variables
                > > >> extract($row);
                > > >>
                > > >> echo $extcolor . " " . $mfgyear . " " . $make_text . " " . $model_text
                > > . "<br />";
                > > >> }
                > > >>
                > > >> ?>
                > > >>
                > > >> </card>
                > > >> </wml>
                > > >>
                > > >>
                > > >>
                > > >> ---------------------------------
                > > >> See the all-new, redesigned Yahoo.com. Check it out.
                > > >>
                > > >> [Non-text portions of this message have been removed]
                > > >>
                > > >>
                > > >>
                > > >
                > > >
                > > >
                > > > As of July 14 2005, it's much easier to be banned from WMLProgramming!
                > > > Please fail to read http://groups.yahoo.com/group/wmlprogramming/ before
                > > you post.
                > > > Yahoo! Groups Links
                > > >
                > > >
                > > >
                > > >
                > > >
                > > >
                > > >
                > >
                > >
                > >
                > >
                > >
                > >
                > > ---------------------------------
                > > Do you Yahoo!?
                > > Next-gen email? Have it all with the all-new Yahoo! Mail Beta.
                > >
                > > [Non-text portions of this message have been removed]
                > >
                > >
                > >
                >
                >
                > [Non-text portions of this message have been removed]
                >






                ---------------------------------
                Do you Yahoo!?
                Everyone is raving about the all-new Yahoo! Mail Beta.

                [Non-text portions of this message have been removed]
              Your message has been successfully submitted and would be delivered to recipients shortly.