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:
<?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?