|
Comments for: baravelle20010221
| Message # 1021759: |
|
Date: 09/01/04 09:42
By: michael Subject: getting php to work with wml on apache2 If you have access to the apache httpd.conf first find this --------------------------------------- # # DefaultType is the default MIME type the server will use for a document # if it cannot otherwise determine one, such as from filename extensions. # If your server contains mostly text or HTML documents, "text/plain" is # a good value. If most of your content is binary, such as applications # or images, you may want to use "application/octet-stream" instead to # keep browsers from trying to display binary files as though they are # text. # DefaultType text/plain # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # <IfModule mod_mime_magic.c> MIMEMagicFile conf/magic </IfModule> ------------------------------------------- edit the 'DefaultType text/plain' to read 'DefaultType text/vnd.wap.wml' and then add this to the addtype area ---------------------------------------- AddType application/x-httpd-wml .wml AddType application/x-httpd-php .wml AddType text/vnd.wap.wml .wml AddType image/vnd.wap.wbmp .wbmp AddType application/vnd.wap.wmlc wmlc AddType application/vnd.wap.wmlscriptc wmlsc AddType application/x-httpd-php .php .phtml .wml .xhtml ---------------------------------------- Save this file and stop your apache server. then restart your server. at the top or each php/wml page place this line of code ---------------------------------------- <?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\">"; ?> ----------------------------------------- then right your script. This works with me and i dont have any problems. if your with a host ask them if they allow you to use .htaccess if they do allow you to use this. create a file .htaccess in a plain text editor. in this file enter the following lines of code DefaultType text/vnd.wap.wml AddType application/x-httpd-wml .wml AddType application/x-httpd-php .wml AddType text/vnd.wap.wml .wml AddType image/vnd.wap.wbmp .wbmp AddType application/vnd.wap.wmlc wmlc AddType application/vnd.wap.wmlscriptc wmlsc AddType application/x-httpd-php .php .phtml .wml .xhtml to save this file click save as and enter this in the file name field ".htaccess" with the quotation marks and click save. place this file in the server root directory and your php/wml pages should work email me at info@venatonium.co.uk if you need more help with this. |
Previous Message | Next Message |
| Comments: | ||
| help...starting out on wap | huggins | 02/07/05 05:28 |
| help me | huggins | 02/04/05 05:53 |
| online emulator VS Mobilephone | gottaged | 12/09/04 11:48 |
| Ayuda | Nathali | 12/07/04 15:59 |
| mysql and wml question | sylvie | 11/26/04 05:41 |
| getting php to work with wml on apache2 | michael | 09/01/04 09:42 |
| free free free | salahuddin saeed | 03/09/03 14:18 |
| RE: Help !!! WML with PHP doesen't work | kevin | 11/26/02 21:27 |
| RE: vars in wml | Spencer | 10/01/02 23:07 |
| To make all this simpler: | skynet | 09/29/02 19:28 |
| Construction Technology | Nyengule Dumisa | 09/17/02 15:41 |
| RE: HELP ME | Rick | 09/09/02 07:54 |
| RE: HELP ME | Rick | 09/06/02 16:17 |
| RE: HELP ME | Rick | 09/06/02 13:15 |
| RE: HELP ME | Rick | 09/06/02 12:52 |
| Nokia phones & PHP + WML | MLS | 08/27/02 08:19 |
| RE: HELP ME | Monkey Harris | 08/01/02 10:56 |
| RE: <postfield> tag | Melkor | 06/24/02 22:37 |
| This guy is a jerk | Melkor | 06/24/02 22:11 |
| WML error: not well-formed | giuseppissimo | 06/15/02 06:35 |
| WAP works without gateway, errors with | Alberto | 04/22/02 14:35 |
| .pwml and .wml | fred | 04/09/02 13:17 |
| Help !!! WML with PHP doesen't work | Monica | 04/08/02 12:59 |
| vars in wml | Richard D. Williams | 03/11/02 15:56 |
| the real setup of wml site | madjed | 03/04/02 09:56 |
| trouble in compilation of your exemple | madjed | 02/25/02 05:50 |
| Congratulations for all!!!! | Pepe | 02/22/02 18:26 |
| .htaccess creation | Garthfield Carter | 02/15/02 05:42 |
| RE: WAP kit for LINUX | abubaker mohammed | 02/12/02 12:36 |
| How to Use nokia tool kit dll in .Net compact | Manjusha | 02/05/02 02:14 |
| RE: HELP ME | pofo | 01/31/02 09:09 |
| HELP ME | aasim | 01/25/02 17:44 |
| NEW .htaccess configuration | Andres | 01/21/02 05:57 |
| Chat page | Muzz | 01/16/02 17:53 |
| Simple wm/php/mysql retrieval needed | Tom Hicks | 01/09/02 09:49 |
| RE: Nokia tool kit and PHP? | {Greenster} | 12/05/01 12:33 |
| help: invalid element | {Greenster} | 12/05/01 12:33 |
| help: invalid element | {Greenster} | 12/05/01 12:32 |
| help: invalid element | {Greenster} | 12/05/01 12:32 |
| mysql INSERT statement with wml | janis | 10/25/01 23:28 |
| How to upload picture to MsAccess97 database | jacky | 10/18/01 00:39 |
| <postfield> tag | Frank | 09/26/01 19:56 |
| RE: Nokia tool kit and PHP? | Laurent | 09/06/01 04:59 |
| Nokia tool kit and PHP? | Josué Marchiani | 08/13/01 12:18 |
| HElp!!.... | Loris | 08/12/01 23:30 |
| commentaire 1 | badra | 08/10/01 14:34 |
| question:user input and file extension | famada | 07/02/01 14:46 |
| I find what I am eager to get | Gang Zhan | 06/17/01 18:01 |
| My wap work around | Erv | 06/08/01 11:17 |
| RE: What means 'Pragma'??? | gary mailer | 05/23/01 15:50 |
| RE: What means 'Pragma'??? | gary mailer | 05/23/01 15:49 |
| mimetypes | Peter | 05/16/01 19:45 |
| mimetypes | Peter | 05/16/01 10:09 |
| What means 'Pragma'??? | Roman Locher | 04/20/01 11:01 |
| RE: mysql insert statements with wml | peterg | 04/17/01 04:43 |
| Wap without MYSQL?? | brad | 04/13/01 14:44 |
| RE: Can I have WML without WAP gateway? | Hasnain Zafar Baloch | 04/04/01 05:55 |
| mysql insert statements with wml | bren | 03/27/01 15:26 |
| Unable to run query.wml | sandeep k mundra | 03/27/01 02:56 |
| RE: Can I have WML without WAP gateway? | Andres | 03/24/01 05:37 |
| RE: .htaccess question | Andres | 03/24/01 05:37 |
| RE: PLEASE HELP | Andres | 03/24/01 05:25 |
| PLEASE HELP | Jesse Lee | 03/21/01 12:08 |
| .htaccess question | Jesse lee | 03/21/01 11:27 |
| interesting application of WAP! | Sameer Verma | 03/13/01 04:21 |
| Can I have WML without WAP gateway? | Bingo | 03/01/01 05:22 |
| offline vs. online database access? | gromit | 02/28/01 06:25 |
| RE: WAP kit for LINUX | Shanx | 02/24/01 22:20 |
| Web based WAP Browser | Wayne Abbott | 02/22/01 09:14 |
| RE: WAP kit for LINUX | Tom Anderson | 02/22/01 08:53 |
| RE: WAP kit for LINUX | Manuel Durán Aguete | 02/22/01 08:25 |
| WAP kit for LINUX | dinny | 02/21/01 23:48 |
| WAP KIT | harvail | 02/21/01 20:01 |
|
If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly. | ||


