How to get PHP to work with WML WAP pages?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Eyvind
Forum Newbie
Posts: 1
Joined: Thu Oct 18, 2007 2:50 pm

How to get PHP to work with WML WAP pages?

Post by Eyvind »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


I set up a .htaccess file with the content "AddType application/x-httpd-php .wml .php", which is what is required to make PHP work with WML pages.  

I then make a PHP page to deliver a simple WML page:

------------

Code: Select all

<?php
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\"?>\n";
?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">

<wml>
    <card id="first" title="First WAP">
        <p>
               
Hello World!
        </p>
    </card>
</wml>
--------------

But when I try to access the PHP page with a mobile device, I get "Service unavailable
technical description: 504gateway timout- The web server is not responding".

Why do I get this response and what more do I have to do to to make PHP work with WAP?


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

are other .wml files (not handled by php) on the same server accessible?
Post Reply