You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Varuna Seneviratna <va...@gmail.com> on 2008/09/11 09:27:50 UTC
[users@httpd] How to configure Apache to processes .html file
Hello
When I save a file with a .html extension ,Apache does not processes
the PHP script in it.How to configure Apache to processes PHP in .html
files?
Thanks Varuna
--
Varuna Seneviratna
No 514 Udumulla Road
Battaramulla
Sri Lanka
Tel : 011-2888620
Mobile:0715617141
Re: [users@httpd] How to configure Apache to processes .html file
Posted by swilting <jo...@wanadoo.fr>.
.htm vs .phtm
Le jeudi 11 septembre 2008 à 14:05 -0400, Norman Peelman a écrit :
> Nick Kew wrote:
> >> # these get processed by the php interpreter (space delimited)
> >> AddType application/x-httpd-php .php .htm .<your extension here>
> >
> > Please don't propagate that myth. Abusing AddType for server-side
> > handlers is a grotty hack inherited from the NCSA server, and has
> > been wrong since Apache 1.1 in 1996.
> >
> > See AddHandler.
> >
> Ok, thanks for the info... have changed my php.conf file accordingly.
>
> AddHandler php5-script .php .htm
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] How to configure Apache to processes .html file
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
> >># these get processed by the php interpreter (space delimited)
> >>AddType application/x-httpd-php .php .htm .<your extension here>
> Nick Kew wrote:
> >Please don't propagate that myth. Abusing AddType for server-side
> >handlers is a grotty hack inherited from the NCSA server, and has
> >been wrong since Apache 1.1 in 1996.
> >
> >See AddHandler.
unluckily this myth is still wide-spread across PHP docs and many package
distributions... looking at PHP docs/bugreports, they don't care much :(
On 11.09.08 14:05, Norman Peelman wrote:
> Ok, thanks for the info... have changed my php.conf file accordingly.
>
> AddHandler php5-script .php .htm
seems they don't have something like that for highlighting PHP sources, only
application/x-https-php-source...
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
- Have you got anything without Spam in it?
- Well, there's Spam egg sausage and Spam, that's not got much Spam in it.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] How to configure Apache to processes .html file
Posted by Norman Peelman <np...@cfl.rr.com>.
Nick Kew wrote:
>> # these get processed by the php interpreter (space delimited)
>> AddType application/x-httpd-php .php .htm .<your extension here>
>
> Please don't propagate that myth. Abusing AddType for server-side
> handlers is a grotty hack inherited from the NCSA server, and has
> been wrong since Apache 1.1 in 1996.
>
> See AddHandler.
>
Ok, thanks for the info... have changed my php.conf file accordingly.
AddHandler php5-script .php .htm
--
Norman
Registered Linux user #461062
-Have you been to www.apache.org yet?-
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] How to configure Apache to processes .html file
Posted by Nick Kew <ni...@webthing.com>.
> # these get processed by the php interpreter (space delimited)
> AddType application/x-httpd-php .php .htm .<your extension here>
Please don't propagate that myth. Abusing AddType for server-side
handlers is a grotty hack inherited from the NCSA server, and has
been wrong since Apache 1.1 in 1996.
See AddHandler.
--
Nick Kew
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] How to configure Apache to processes .html file
Posted by Norman Peelman <np...@cfl.rr.com>.
Varuna Seneviratna wrote:
> Hello
> When I save a file with a .html extension ,Apache does not
> processes the PHP script in it.How to configure Apache to processes
> PHP in .html files?
>
> Thanks Varuna
>
> --
> Varuna Seneviratna
> No 514 Udumulla Road
> Battaramulla
> Sri Lanka
> Tel : 011-2888620
> Mobile:0715617141
You can have any file-extension parsed by adding that extension to the
AddType directive (found in main httpd.conf, apache.conf, or
mods-enabled - php.conf). But you should have a system such as:
# these get processed by the php interpreter (space delimited)
AddType application/x-httpd-php .php .htm .<your extension here>
I personally use (for me it's php5.conf):
.php .htm for pure php scripts or mixed php/html
and I use .html .shtml for completely static pages (you don't need to
tell apache this.)
--
Norman
Registered Linux user #461062
-Have you been to www.apache.org yet?-
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] How to configure Apache to processes .html file
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
On 11.09.08 12:57, Varuna Seneviratna wrote:
> When I save a file with a .html extension ,Apache does not processes
> the PHP script in it.How to configure Apache to processes PHP in .html
> files?
- you should not name PHP files as .html
- just do it the same way PHP files are marked to be processes with PHP
interpreter (AddType)
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I just got lost in thought. It was unfamiliar territory.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org