Page 1 of 1

How to get PHP to work with WML WAP pages?

Posted: Thu Oct 18, 2007 2:52 pm
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]

Posted: Sat Oct 20, 2007 11:13 am
by volka
are other .wml files (not handled by php) on the same server accessible?