| Author |
PHP Wap page errors on T68i |
AMC Joined: Jul 04, 2003 Posts: 5 PM |
We are setting up a wap push service using a php page which has the wml embedded in it so the page we push is a .php file to the device....
Does t68i support .php files, as right now it gives the error "something is wrong with the page you tried to access. choose another link".
If it anyone knows what we need to fix it so that the wml gets displayed properly it would be a great help.
[ This Message was edited by: AMC on 2003-07-04 17:34 ] |
|
|
arnoldc Joined: Dec 14, 2001 Posts: > 500 From: Philippines PM, WWW
|
you can use php to render wml but not the other way around |
AMC Joined: Jul 04, 2003 Posts: 5 PM |
ok, im not terribly technical, but Im posting on behalf of my dev whos on a different time zone and is stuck with this as the page works fine on many other devices including nokia series 60 and and sharp GX10 but not the T68i!
the page looks something like this:
?php (this post wont display the proper tag)
(bit of php)
?>
wml text page (including pulling in results from the php code)
(bit more php)
?>
[ This Message was edited by: AMC on 2003-07-04 18:20 ] |
artzi Joined: Aug 05, 2002 Posts: 14 PM |
In the beginning of php code:
header( 'content-Type: text/vnd.wap.wml');
Working?
|
AMC Joined: Jul 04, 2003 Posts: 5 PM |
i have the header in place.
the strange thing is the code works fine on all other devices, except the sony ones.
header("Content-type: text/vnd.wap.wml");
echo("\n");
echo("\n\n");
?>
So pls tell me what else to do as i have followed strict guidelines in the wml code also (else it wouldnt have worked in the other devices)
Await something.
AMC |
arnoldc Joined: Dec 14, 2001 Posts: > 500 From: Philippines PM, WWW
|
the WML code PHP is spitting to the device is incomplete.
a minimal WML code should have:
<wml>....</wml>
<card>...</card>
a WML page is called a "card" and a collection of WML pages is called a "deck"
try this:
<wml>
<card id="card1" title="Welcome">
<p mode="wrap">
Hello, Mobile World!
</p>
</card>
</wml>
|
AMC Joined: Jul 04, 2003 Posts: 5 PM |
Hello Arnold,
I have the wml working fine ..no issues with it..works fine in all other devices..
Actually the board didnt display the code that i pasted
this is the error :
This is the error :
"
something is wrong with the page you tried to access. choose another link
"
AMC |
arnoldc Joined: Dec 14, 2001 Posts: > 500 From: Philippines PM, WWW
|
when pasting code, check "disable html on this post"  |
artzi Joined: Aug 05, 2002 Posts: 14 PM |
I dont use any...
echo("n");
...just empty lines.
This works for my T68i
<?
header( 'content-Type: text/vnd.wap.wml');
echo '<?xml version="1.0"?>';
echo '
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head>
<meta http-equiv="cache-control" content="no-cache" />
</head>
<card title="php to Wap" id="info">
<p>
Testing txt...
</p>
</card>
</wml>
';
?>
Any help? You can test it...
http://www.saunalahti.fi/aweb/t68_phpwml.php
[ This Message was edited by: artzi on 2003-07-05 18:47 ]
[ This Message was edited by: artzi on 2003-07-06 14:07 ]
[ This Message was edited by: artzi on 2003-07-06 14:08 ] |
AMC Joined: Jul 04, 2003 Posts: 5 PM |
This is the actual code :
<?php
///there is code here which queries the db and searches the user agent.
header("Content-type: text/vnd.wap.wml");
echo("<?xml version=\"1.0\"?>\n");
echo("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n\n");
?>
<wml>
<card id="card2">
<p>
<br/>
</p>
<?
if($disp)
{
?>
<p><? echo $disp ?><br/></p>
<?
}
else
{
?>
<p>
Please download your order.
</p>
<p><anchor>Download<go href="<?php echo $mypath ?>" /></anchor><br/></p>
<?
}
?>
</card>
</wml>
<?
//functions here
?> |
artzi Joined: Aug 05, 2002 Posts: 14 PM |
I copy/paste Your code... work's fine on my server... with my T68i.
What is Your T68i software version? It can be a problem...
|
vain Joined: Jan 03, 2005 Posts: 5 PM |
or try changing the phone's gateway - i've come across pages that produce such popups when accessed through some gateways. I'll suggest going to Svendsen Net's user-agent info with the t68 and the other makes and compare the reports.
This message was posted from a T68i |
dave1000 Joined: Jun 22, 2003 Posts: 114 From: UK PM |
I have seen something like this happen before. I know virtually nothing about this stuff, but I helped a friend debugging something he was doing. I think the problem was that the server was reporting the wrong encoding to the the phone. There was nothing wrong with the actual code. |
channel5 Joined: Jan 11, 2005 Posts: 1 PM |
Hi
I am having similar problems, using the T610
I have the following test page at http://www.ashbourne.net/cgi-bin/pictures.pl
I t returns WML code as shown below:
< ?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=" no1" title=" Card 1" > < p> This is Edd`s WML pictures page< /p> < p> Select a picture to download< /p> < p> < a href=" ../chris1s.jpg" > Chris< /a> < br> < /br> < a href=" ../edd1s.jpg" > Edd< /a> < br> < /br> < a href=" ../john5s.jpg" > John< /a> < br> < /br> < a href=" ../si_paul1s.jpg" > Si and Paul< /a> < /p> < /card> < /wml>
This page works on every Nokia i have tried it on, but Sony Ericssons just wont take it, they say there is a problem with the page and won't download them.. i have validated the wml and the validators say it is fine. Does anyone have any ideas to what is wrong with it?
cheers
Edd |
|
|