WAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreWAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old September 7th, 2004, 12:11 PM
samibami samibami is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 2 samibami User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
how to config web server to support wml+php

hi there,
i'm trying to combine php with wml pages.
so far it didnt work at all.
here's a simple code i tried:

<?php
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>
<card id="card1">
<?php print "hello world";?>

</p>
</card>
</wml>


i tried numerous versions and multiple codes from many sources so if this code is bugged ignore it .
what i need to know is what configuration are needed for my web server.i'm running "abyss-x" web server on my machine.
thanks

Reply With Quote
  #2  
Old September 7th, 2004, 12:50 PM
andymoo's Avatar
andymoo andymoo is offline
Timelord
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2003
Location: Loughborough, Leicestershire
Posts: 605 andymoo User rank is Second Lieutenant (5000 - 10000 Reputation Level)andymoo User rank is Second Lieutenant (5000 - 10000 Reputation Level)andymoo User rank is Second Lieutenant (5000 - 10000 Reputation Level)andymoo User rank is Second Lieutenant (5000 - 10000 Reputation Level)andymoo User rank is Second Lieutenant (5000 - 10000 Reputation Level)andymoo User rank is Second Lieutenant (5000 - 10000 Reputation Level)andymoo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 5 h 53 m 46 sec
Reputation Power: 63
.htaccess

you need to tell the server to accept wml pages, this can often be done in your control panel like cpanel or in your .htaccess file if either are supported.

there's more on the mime types you need including for a fully featured WAP site in this thread

but a quick example from of one of the .htaccess files i use if this:

AddType text/vnd.wap.wml wml

hope this helps, let us know how you get on with it, good luck
__________________
Andy Moore << oh no it's got a blog.....
Word Press WAP Plugin with Ad Mob Advertising revenue
PHP developer
deploying ringtones, mp3 downloads and realtones
I'm a geek who's obsessed with stats and gadgets

Reply With Quote
  #3  
Old September 8th, 2004, 05:58 AM
samibami samibami is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 2 samibami User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thanks but it still doesn't work

Quote:
Originally Posted by andymoo
you need to tell the server to accept wml pages, this can often be done in your control panel like cpanel or in your .htaccess file if either are supported.

there's more on the mime types you need including for a fully featured WAP site in this thread

but a quick example from of one of the .htaccess files i use if this:

AddType text/vnd.wap.wml wml

hope this helps, let us know how you get on with it, good luck


I already added all the mime types that should support a simple wml ,php enabled, page.
i also have these mimes :
application/x-httpd-php3 wml
application/x-httpd-php wml

so....i don't know what else i can do

Reply With Quote
  #4  
Old February 4th, 2005, 11:36 PM
lerique lerique is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 1 lerique User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 10 sec
Reputation Power: 0
Unhappy Same Problem here

Hi guys.

I think I'm having the same MIME type problem with wml extension. I'm using easyphp on winxp profesional.

I already have added all the MIME type I could find on internet, but anytime I use a browser to check a php based wml. I got a message that browser didnt recognized the file.

I have a versión on Jsp, here the wml works good on browsers.

What can I do ???.

what do you think guys, is better to work with php than jsp?

Luis Arturo
Ecuador.

Reply With Quote
  #5  
Old February 16th, 2005, 11:39 AM
itfcfan itfcfan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Norwich, UK
Posts: 43 itfcfan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 40 m 18 sec
Reputation Power: 5
Hi,

The mime type is not the problem here - you have correctly set the content-type at the top of your php file using the header command. The mime type only applies to static wml pages using the .wml extension.

Unlike most HTML browsers, WML browsers are less forgiving and require documents to be well formed and validate to the doctype they specify. In your example, you have an ending paragraph tag (</p>) but no start tag. All you have to do to make this work (unless I've overlooked any other mistakes) is add an opening paragraph tag (<p>) before your php hello world write.

Let me know if you have any further problems.

Cheers,

John Levermore
http://www.johnlevermore.com/

Reply With Quote
  #6  
Old February 17th, 2005, 10:50 AM
G00SE's Avatar
G00SE G00SE is offline
.... escape ....
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 448 G00SE User rank is Sergeant (500 - 2000 Reputation Level)G00SE User rank is Sergeant (500 - 2000 Reputation Level)G00SE User rank is Sergeant (500 - 2000 Reputation Level)G00SE User rank is Sergeant (500 - 2000 Reputation Level)G00SE User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 3 Days 19 h 42 m 8 sec
Reputation Power: 11
The code is not valid:

<?php
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>
<card id="card1">
<p><?php print "hello world";?>
</p>
</card>
</wml>


Try it now

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreWAP Programming > how to config web server to support wml+php


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway