PHP works with .php files, but not in .htm

This is a discussion on PHP works with .php files, but not in .htm within the Apache Web Server forums, part of the Web Server and Related Forums category; I am a new to this and am thankful to anyone of you that can help me, so thanks in ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-29-2005
Mark Mullen
 
Posts: n/a
Default PHP works with .php files, but not in .htm

I am a new to this and am thankful to anyone of you that can help me, so
thanks in advance.

All my scripts and html is in c:\Program Files\Apache Group\Apache2\htdocs.
I have no idea why my .php scripts work when brought up in a browser but not
htm with php inlcudes or simple echo statements.
..
I set up the PHP5 and APACHE 2 on WindowsXP for learning. I Ran the <?php
phpinfo();?> This is what I got. Anyone have any ideas what I am doing
wrong?
PHP Version 5.0.3

System Windows NT MJ1 5.1 build 2600
Build Date Dec 15 2004 08:06:41
Configure Command cscript /nologo configure.js
"--enable-snapshot-build" "--with-gd=shared"
Server API Apache 2.0 Handler
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\php\php.ini
PHP API 20031224
PHP Extension 20041030
Zend Extension 220040412
Debug Build no
Thread Safety enabled
IPv6 Support enabled
Registered PHP Streams php, file, http, ftp, compress.zlib
Registered Stream Socket Transports tcp, udp


  #2 (permalink)  
Old 01-29-2005
unbending
 
Posts: n/a
Default Re: PHP works with .php files, but not in .htm

Only *.php files are recognized as containing PHP code and only they
execute that code. You need to change the mime-type for *.html pages to
behave like the *.php pages.

  #3 (permalink)  
Old 01-29-2005
Mark Mullen
 
Posts: n/a
Default Re: PHP works with .php files, but not in .htm

Pieter <P.dfm@wsx.nl> email worked. Thanks.


"Mark Mullen" <mbjmullen@verizon.net> wrote in message
news:YSAKd.780$VW3.383@trndny07...
>I am a new to this and am thankful to anyone of you that can help me, so
>thanks in advance.
>
> All my scripts and html is in c:\Program Files\Apache
> Group\Apache2\htdocs. I have no idea why my .php scripts work when brought
> up in a browser but not htm with php inlcudes or simple echo statements.
> .
> I set up the PHP5 and APACHE 2 on WindowsXP for learning. I Ran the <?php
> phpinfo();?> This is what I got. Anyone have any ideas what I am doing
> wrong?
> PHP Version 5.0.3
>
> System Windows NT MJ1 5.1 build 2600
> Build Date Dec 15 2004 08:06:41
> Configure Command cscript /nologo configure.js
> "--enable-snapshot-build" "--with-gd=shared"
> Server API Apache 2.0 Handler
> Virtual Directory Support enabled
> Configuration File (php.ini) Path C:\php\php.ini
> PHP API 20031224
> PHP Extension 20041030
> Zend Extension 220040412
> Debug Build no
> Thread Safety enabled
> IPv6 Support enabled
> Registered PHP Streams php, file, http, ftp, compress.zlib
> Registered Stream Socket Transports tcp, udp
>
>



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:51 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0