[PHP] Php files with .html extension?

2004-10-25 Thread Phpu
Hi,

How can i do a php script with a html extensionsuch as 
http://www.blinds-wise.com/shop/p/blind/bid/1/venetian_blinds.html

Thanks


[PHP] Re: Php files with .html extension?

2004-10-25 Thread M. Sokolewicz
Phpu wrote:
Hi,
How can i do a php script with a html extensionsuch as 
http://www.blinds-wise.com/shop/p/blind/bid/1/venetian_blinds.html
Thanks
when using eg. apache, you can add a .htaccess file with the following line:
AddType application/x-httpd-php .html
That will overwrite the normal way apache handles .html files, and it 
will let the php engine parse them in that and all subdirectories (which 
don't reset this behavious using another .htaccess file with different 
Type-related options)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Php files with .html extension?

2004-10-25 Thread Greg Donald
On Mon, 25 Oct 2004 16:37:52 +0300, Phpu [EMAIL PROTECTED] wrote:
 How can i do a php script with a html extensionsuch as
 http://www.blinds-wise.com/shop/p/blind/bid/1/venetian_blinds.html

If you use Apache you can edit you httpd.conf and add:

AddType application/x-httpd-php .html


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Php files with .html extension?

2004-10-25 Thread Brian V Bonini
On Mon, 2004-10-25 at 09:37, Phpu wrote:
 Hi,
 
 How can i do a php script with a html extensionsuch as 
 http://www.blinds-wise.com/shop/p/blind/bid/1/venetian_blinds.html
 

AddType application/x-httpd-php .php .php3 .html

-- 

s/:-[(/]/:-)/g


BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu
==
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
Key Info: http://gfx-design.com/keys
Linux Registered User #339825 at http://counter.li.org
aGEhIGJldCB5b3UgdGhpbmsgeW91IHByZXR0eSBzbGljayBmb3IgZmlndXJpbmcgb3V0I
GhvdyB0byBkZWNvZGUgdGhpcy4gVG9vIGJhZCBpdCBoYXMgbm8gc2VjcmV0IGluZm8gaW
4gaXQgaGV5Pwo=

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Php files with .html extension?

2004-10-25 Thread Jay Blanchard
[snip]
How can i do a php script with a html extensionsuch as
http://www.blinds-wise.com/shop/p/blind/bid/1/venetian_blinds.html
[/snip]

You set it up in your httpd.conf You should have

AddType application/x-httpd-php .php

change it to 

AddType application/x-httpd-php .php .html

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Php files with .html extension?

2004-10-25 Thread Matt M.
 How can i do a php script with a html extensionsuch as 
 http://www.blinds-wise.com/shop/p/blind/bid/1/venetian_blinds.html
 

apache could do this a couple ways

http://httpd.apache.org/docs/mod/mod_mime.html#addhandler
http://httpd.apache.org/docs-2.0/mod/core.html#setinputfilter
http://httpd.apache.org/docs-2.0/mod/core.html#setoutputfilter

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Php files with .html extension?

2004-10-25 Thread Graham Cossey
Do not forget that if you do this ALL files with the .html extension will be
parsed by PHP whether they are PHP scripts or not which could be something
you need to consider from a performance perspective.

 -Original Message-
 From: Jay Blanchard [mailto:[EMAIL PROTECTED]
 Sent: 25 October 2004 14:59
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] Php files with .html extension?


 [snip]
 How can i do a php script with a html extensionsuch as
 http://www.blinds-wise.com/shop/p/blind/bid/1/venetian_blinds.html
 [/snip]

 You set it up in your httpd.conf You should have

 AddType application/x-httpd-php .php

 change it to

 AddType application/x-httpd-php .php .html

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Php files with .html extension?

2004-10-25 Thread Gryffyn, Trevor
That's definitely a good point.  I'm curious though, would it really be
a significant performance issue?  Even if a lot of HTML files are being
processed by PHP?  I mean, if the PHP parser goes through and never sees
a ? Or ?php, does it do any more than just output the file?   True,
that's something, but is it anything really significant.

The only thing I can think of that'd be an issue is, what happens if you
have a bad compile of PHP, or what happens to a system after PHP is run
180,000 times?  Small programming issues can create minute instability
issues for systems.  Or in the case of outright memory leaks, sometimes
a major issue.

That's the only thing that'd really concern me, but it's still
definitely a good question to ask.

-TG

 -Original Message-
 From: Graham Cossey [mailto:[EMAIL PROTECTED] 
 Sent: Monday, October 25, 2004 11:30 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] Php files with .html extension?
 
 
 Do not forget that if you do this ALL files with the .html 
 extension will be
 parsed by PHP whether they are PHP scripts or not which could 
 be something
 you need to consider from a performance perspective.
 
  -Original Message-
  From: Jay Blanchard [mailto:[EMAIL PROTECTED]
  Sent: 25 October 2004 14:59
  To: [EMAIL PROTECTED]
  Subject: RE: [PHP] Php files with .html extension?
 
 
  [snip]
  How can i do a php script with a html extensionsuch as
  http://www.blinds-wise.com/shop/p/blind/bid/1/venetian_blinds.html
  [/snip]
 
  You set it up in your httpd.conf You should have
 
  AddType application/x-httpd-php .php
 
  change it to
 
  AddType application/x-httpd-php .php .html
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re[2]: [PHP] Php files with .html extension?

2004-10-25 Thread Richard Davey
Hello Trevor,

Monday, October 25, 2004, 4:47:53 PM, you wrote:

GT processed by PHP?  I mean, if the PHP parser goes through and never sees
GT a ? Or ?php, does it do any more than just output the file? True,
GT that's something, but is it anything really significant.

True, it doesn't do anything other than output the HTML. But it's that
load - scan - determine - output that takes up CPU time and memory.

Sure, on most sites it doesn't matter one bit. But on popular sites..
well, you can do the math I'm sure.

I guess at the end of the day it comes down to don't do un-necessary
things. That goes for your code as well as your server set-up, but
it's true to say that if you don't actually need to parse HTML as PHP,
then don't.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I am not young enough to know everything. - Oscar Wilde

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: Re[2]: [PHP] Php files with .html extension?

2004-10-25 Thread Gryffyn, Trevor
 True, it doesn't do anything other than output the HTML. But it's that
 load - scan - determine - output that takes up CPU time and memory.
 
 Sure, on most sites it doesn't matter one bit. But on popular sites..
 well, you can do the math I'm sure.
 
 I guess at the end of the day it comes down to don't do un-necessary
 things. That goes for your code as well as your server set-up, but
 it's true to say that if you don't actually need to parse HTML as PHP,
 then don't.

Well yeah. I fully agree.  Keep it simple, don't put any more load on a server than 
you have to, don't run anything you don't have to, don't provide any opportunity for 
the system to become unstable or slow... if you don't have to.

Going on the assumption that someone might have a requirement to use .html, I was 
wondering what the impact would be.   I could see someone wanting to use .html to 
obscure the fact that they were using PHP scripts (for various reason), but if that's 
intended as a security measure, then it's classic security through obscurity, which 
will fool some people, but not the people you really have to worry about.

-TG

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re[4]: [PHP] Php files with .html extension?

2004-10-25 Thread Richard Davey
Hello Trevor,

Monday, October 25, 2004, 6:31:07 PM, you wrote:

GT I could see someone wanting to use .html to obscure the fact that
GT they were using PHP scripts (for various reason), but if that's
GT intended as a security measure, then it's classic security through
GT obscurity, which will fool some people, but not the people you
GT really have to worry about.

Absolutely. Which begs the question - why bother?

One of the only reasons I can think of is if you were moving from a
static HTML site to a PHP site and you were already well indexed on
Google, etc - you may want to retain those links and not cause 404's
all over the place, in which case it makes business sense. But for
most people the obscurity is simply fooling the wrong folks.

I don't think you'll find any real benchmarks on this because
they're so subjective and rely more on your hosting arrangement than
PHP itself. But I'm sure you could simulate a stress-test for this
quite easily.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I am not young enough to know everything. - Oscar Wilde


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Php files with .html extension?

2004-10-25 Thread Greg Donald
On Mon, 25 Oct 2004 16:30:14 +0100, Graham Cossey
[EMAIL PROTECTED] wrote:
 Do not forget that if you do this ALL files with the .html extension will be
 parsed by PHP whether they are PHP scripts or not which could be something
 you need to consider from a performance perspective.


I setup a simple benchmark test because I was curious how much
overhead parsing .html files as PHP files actually caused.  Here are
those results:


Server specs:

Debain Sarge (testing)
 uname -a
Linux netpc0378 2.6.7-1-686 #1 Thu Jul 8 05:36:53 EDT 2004 i686 GNU/Linux

 php4 -v
PHP 4.3.4 (cli) (built: Mar 27 2004 08:04:22)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies

 apache -v
Server version: Apache/1.3.31 (Debian GNU/Linux)
Server built:   Sep  9 2004 07:31:19

 cat /proc/cpuinfo
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 8
model name  : Celeron (Coppermine)
stepping: 10
cpu MHz : 997.253
cache size  : 128 KB
fdiv_bug: no
hlt_bug : no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 2
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 mmx fxsr sse
bogomips: 1978.36

 free -m
 total   used   free sharedbuffers cached
Mem:   249189 59  0  1 54
-/+ buffers/cache:134115
Swap:  486 29456


The index.html test file is very simple:

html
head
titleBenchmark Test/title
/head
body bgcolor=white
Benchmark Me!
/body
/html


Then the actual tests:


1) Apache not parsing .html files as PHP:

 ab -n1 http://localhost/benchmark/
This is ApacheBench, Version 1.3d $Revision: 1.73 $ apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 1 requests
Server Software:Apache/1.3.31
Server Hostname:localhost
Server Port:80

Document Path:  /benchmark/
Document Length:270 bytes

Concurrency Level:  1
Time taken for tests:   27.134 seconds
Complete requests:  1
Failed requests:0
Broken pipe errors: 0
Non-2xx responses:  1
Total transferred:  449 bytes
HTML transferred:   270 bytes
Requests per second:368.54 [#/sec] (mean)
Time per request:   2.71 [ms] (mean)
Time per request:   2.71 [ms] (mean, across all concurrent requests)
Transfer rate:  165.48 [Kbytes/sec] received

Connnection Times (ms)
  min  mean[+/-sd] median   max
Connect:0 00.0  0 2
Processing: 1 2   19.8  1   810
Waiting:0 2   19.8  1   810
Total:  1 2   19.8  1   810

Percentage of the requests served within a certain time (ms)
  50%  1
  66%  1
  75%  1
  80%  1
  90%  2
  95%  3
  98%  3
  99% 14
 100%810 (last request)


2) Apache parsing .html files as PHP:

(I edited /etc/apache/mime.types and added html to the
application/x-httpd-php line, and then I restarted Apache.)

 ab -n1 http://localhost/benchmark/
This is ApacheBench, Version 1.3d $Revision: 1.73 $ apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 1 requests
Server Software:Apache/1.3.31
Server Hostname:localhost
Server Port:80

Document Path:  /benchmark/
Document Length:270 bytes

Concurrency Level:  1
Time taken for tests:   30.215 seconds
Complete requests:  1
Failed requests:0
Broken pipe errors: 0
Non-2xx responses:  1
Total transferred:  449 bytes
HTML transferred:   270 bytes
Requests per second:330.96 [#/sec] (mean)
Time per request:   3.02 [ms] (mean)
Time per request:   3.02 [ms] (mean, across all concurrent requests)
Transfer rate:  148.60 [Kbytes/sec] received

Connnection Times (ms)
  min  mean[+/-sd] median   max
Connect:0 00.0  0 1
Processing: 1 2   23.9  1   919
Waiting:0 2   23.9  1   918
Total:  1 2   23.9  1   919
ERROR: The median and mean for the 

Re: [PHP] Php files with .html extension?

2004-10-25 Thread Curt Zirzow
* Thus wrote Greg Donald:
 
 The summary results:
 
 For 10K local requests:
 27.1 seconds with .html not parsed as PHP
 vs.
 30.2 seconds with .html parsed as PHP.
 
 I only ran these tests locally, and only on the one server.. so it's
 definatly not very scientific.  I think we all sorta knew the results
 anyway.

Nice work! I wonder what the stats would be like with apache2 :)

Curt
-- 
Quoth the Raven, Nevermore.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Php files with .html extension?

2004-10-25 Thread zooming
On a related note I was wondering what people thought of php files with no
extensions?  So if I changed index.php to just index then I can create url
like www.mydomain.com/index/articleid/29 so it's search engine friendly.

# .htaccess file
DefaultType application/x-httpd-php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Php files with .html extension?

2004-10-25 Thread The Snake from Hell!

You would probably brake a heck of a lot of things. CGI
scripts, etc.

On a related note I was wondering what people thought of
php files with noextensions?  So if I changed index.php to
just index then I can create urllike
www.mydomain.com/index/articleid/29 so it's search engine
friendly.

# .htaccess file
DefaultType application/x-httpd-php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Php files with .html extension?

2004-10-25 Thread zooming
I don't use cgi scripts.

- Original Message - 
From: The Snake from Hell! [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 25, 2004 4:25 PM
Subject: Re: [PHP] Php files with .html extension?


 
 You would probably brake a heck of a lot of things. CGI
 scripts, etc.
 
 On a related note I was wondering what people thought of
 php files with noextensions?  So if I changed index.php to
 just index then I can create urllike
 www.mydomain.com/index/articleid/29 so it's search engine
 friendly.
 
 # .htaccess file
 DefaultType application/x-httpd-php
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Php files with .html extension?

2004-10-25 Thread Greg Donald
On Mon, 25 Oct 2004 18:44:41 +, Curt Zirzow
[EMAIL PROTECTED] wrote:
 Nice work! I wonder what the stats would be like with apache2 :)

Suse 9.1 box:

 cat /proc/cpuinfo 
processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 6
model   : 4
model name  : AMD Athlon(tm) Processor
stepping: 2
cpu MHz : 909.168
cache size  : 256 KB
fdiv_bug: no
hlt_bug : no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 1
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca
cmov pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow
bogomips: 1794.04

 free -m
 total   used   free sharedbuffers cached
Mem:   504497  6  0164 47
-/+ buffers/cache:285219
Swap: 1023  0   1023

 httpd -v
Server version: Apache/2.0.51
Server built:   Sep 19 2004 15:44:02

 php -v
PHP 5.0.2 (cgi) (built: Sep 24 2004 20:55:59)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.2, Copyright (c) 1998-2004 Zend Technologies


1) Apache 2 not parsing .html as PHP:

  ab -n1 http://localhost/benchmark/
This is ApacheBench, Version 2.0.41-dev $Revision: 1.121.2.12 $ apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 1 requests


Server Software:Apache/2.0.51
Server Hostname:localhost
Server Port:80

Document Path:  /benchmark/
Document Length:105 bytes

Concurrency Level:  1
Time taken for tests:   11.234968 seconds
Complete requests:  1
Failed requests:0
Write errors:   0
Total transferred:  379 bytes
HTML transferred:   105 bytes
Requests per second:890.08 [#/sec] (mean)
Time per request:   1.123 [ms] (mean)
Time per request:   1.123 [ms] (mean, across all concurrent requests)
Transfer rate:  329.42 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:00   0.0  0   1
Processing: 00   1.4  1 108
Waiting:00   0.8  0  70
Total:  00   1.4  1 108

Percentage of the requests served within a certain time (ms)
  50%  1
  66%  1
  75%  1
  80%  1
  90%  1
  95%  1
  98%  1
  99%  1
 100%108 (longest request)


2) Apache 2 parsing .html as PHP:

 ab -n1 http://localhost/benchmark/
This is ApacheBench, Version 2.0.41-dev $Revision: 1.121.2.12 $ apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 1 requests


Server Software:Apache/2.0.51
Server Hostname:localhost
Server Port:80

Document Path:  /benchmark/
Document Length:105 bytes

Concurrency Level:  1
Time taken for tests:   30.532746 seconds
Complete requests:  1
Failed requests:0
Write errors:   0
Total transferred:  311 bytes
HTML transferred:   105 bytes
Requests per second:327.52 [#/sec] (mean)
Time per request:   3.053 [ms] (mean)
Time per request:   3.053 [ms] (mean, across all concurrent requests)
Transfer rate:  99.47 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:00   0.0  0   0
Processing: 22   0.5  2   9
Waiting:02   0.4  2   9
Total:  22   0.5  2   9

Percentage of the requests served within a certain time (ms)
  50%  2
  66%  2
  75%  2
  80%  3
  90%  3
  95%  3
  98%  3
  99%  3
 100%  9 (longest request)


Summary for 10K local requests:
11.2 seconds for .html not parsed as PHP
vs.
30.5 seconds as .html parsed as PHP.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] files with html extension

2001-03-22 Thread Harshdeep S Jawanda


Jeff Armstrong wrote:

  This is exactly why http://www.w3.org recommend that you DONT
  SPECIFY A FILE TYPE TYPE in your HREFs.

But doth that actually work - how many web servers are able to handle this type
of link correctly?

Ummm... and what happens (or is supposed to happen) to resolve xxx.html and
xxx.php?

--
Regards,
Harshdeep Singh Jawanda.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] files with html extension

2001-03-22 Thread Jeff Armstrong

Yes it works in Apache - try it!
You could also read the Apache documentation on Content
Negotiation. The following is a quote
-
Note on hyperlinks and naming conventions
If you are using language negotiation you can choose between
different naming conventions, because files can have more than
one extension...

snip

Looking at the table above you will notice that it is always
possible to use the name without any extensions in an hyperlink
(e.g., foo). The advantage is that you can hide the actual type
of a document rsp. file and can change it later, e.g., from html
to shtml or cgi without changing any hyperlink references.
-

On how it resolves conflicts?
Not documented, but a quick fiddle seems to indicate
that it does the following:

  if (no_specific_type_requested()) {
get list of possible files in ALPHABETICAL order
if (file_is_recognised_mime_type())
  return this file

recognised mime types come from /etc/mime.types

Regards
Jeff

-Original Message-
From: Harshdeep S Jawanda [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 11:06 AM
To: Jeff Armstrong
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] files with html extension



Jeff Armstrong wrote:

  This is exactly why http://www.w3.org recommend that you DONT
  SPECIFY A FILE TYPE TYPE in your HREFs.

But doth that actually work - how many web servers are able to handle this
type
of link correctly?

Ummm... and what happens (or is supposed to happen) to resolve xxx.html and
xxx.php?

--
Regards,
Harshdeep Singh Jawanda.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] files with html extension

2001-03-20 Thread Rick VanNorman

Hi,

Is is possible to use the php script tags in files with an
html extension? I'm running 4.0.4pl1 and apache 1.3.12
on OpenBSD 2.8.

Thanks,
Rick VanNorman





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] files with html extension

2001-03-20 Thread Jack Dempsey

You can tell apache to have the php interpreter parse files with an html
extension, thereby letting you use the tags in html files...whether this
is a good solution or not is another question.that would mean that each
file would get parsedwhy are you trying to do this?

jack

-Original Message-
From: Rick VanNorman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 12:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP] files with html extension


Hi,

Is is possible to use the php script tags in files with an
html extension? I'm running 4.0.4pl1 and apache 1.3.12
on OpenBSD 2.8.

Thanks,
Rick VanNorman





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] files with html extension

2001-03-20 Thread Rick VanNorman


On 3/20/2001 at 12:29 PM Jack Dempsey wrote:

You can tell apache to have the php interpreter parse files with an html
extension, thereby letting you use the tags in html files...whether
this
is a good solution or not is another question.that would mean that each
file would get parsedwhy are you trying to do this?


To be able to include php code in otherwise full html files;
most especially to allow me to do it without having to change
the name of every file and fix every href in the entire site.

So, exactly how do I tell apache to do this?

Thanks,
Rick
1


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] files with html extension

2001-03-20 Thread Mark Maggelet

for php4:
AddType application/x-httpd-php .html

for php3:
AddType application/x-httpd-php3 .html

On Tue, 20 Mar 2001 10:12:56 -0800, Rick VanNorman
([EMAIL PROTECTED]) wrote:
On 3/20/2001 at 12:29 PM Jack Dempsey wrote:

You can tell apache to have the php interpreter parse files with an
html
extension, thereby letting you use the tags in html
files...whether
this
is a good solution or not is another question.that would mean
that each
file would get parsedwhy are you trying to do this?


To be able to include php code in otherwise full html files;
most especially to allow me to do it without having to change
the name of every file and fix every href in the entire site.

So, exactly how do I tell apache to do this?

Thanks,
Rick
1


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: php-list-
[EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] files with html extension

2001-03-20 Thread Phillip Bow

Personally I recommend people don't do this unless their web server is going
to serve only(or mostly) php pages, and very few straight html pages.  It
will save you time mucking around on the server, but the increase in
overhead isn't really worth it. IMHO of course.
--
phill



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] files with html extension

2001-03-20 Thread Jeff Armstrong

I agree with Phill, don't make all your HTML into PHP
unless you aint got much - but hey if you aint got much then
you can fix the real problem!

soapbox: {
 The issue here seems to derive from the fact that all
 the internal HREFs point to xxx.html

 This is exactly why http://www.w3.org recommend that you DONT
 SPECIFY A FILE TYPE TYPE in your HREFs.

 Cool URIs Dont change - http://www.w3.org/Provider/Style/URI
 Good!!
   A HREF=/somepage Some Page!/A
 NOT good!
   A HREF=/somepage.html Some Page!/A
   ^
 Let the server decide which page to dish.
 Then it's easy peasy to replace xxx.html with xxx.php or even
 xxx.my_new_language_of_the_moment.
};

Jeff

-Original Message-
From: Phillip Bow [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 6:35 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] files with html extension


Personally I recommend people don't do this unless their web server is going
to serve only(or mostly) php pages, and very few straight html pages.  It
will save you time mucking around on the server, but the increase in
overhead isn't really worth it. IMHO of course.
--
phill


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] files with html extension

2001-03-20 Thread Rick VanNorman

This is the best idea I've heard/read yet. Thanks Jeff!
Rick VanNorman

*** REPLY SEPARATOR  ***

On 3/20/2001 at 6:49 PM Jeff Armstrong wrote:

 This is exactly why http://www.w3.org recommend that you DONT
 SPECIFY A FILE TYPE TYPE in your HREFs.

 Cool URIs Dont change - http://www.w3.org/Provider/Style/URI
 Good!!
   A HREF=/somepage Some Page!/A
 NOT good!
   A HREF=/somepage.html Some Page!/A
   ^
 Let the server decide which page to dish.
 Then it's easy peasy to replace xxx.html with xxx.php or even
 xxx.my_new_language_of_the_moment.
};

e


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] files with html extension

2001-03-20 Thread Jeff Oien

From the doc:
---
How can I remove the file extensions...
...from my URIs in a practical file-based web server?

If you are using, for example, Apache, you can set it 
up to do content negotiation. 
--
How is this done? 
Jeff Oien

 On 3/20/2001 at 6:49 PM Jeff Armstrong wrote:
 
  This is exactly why http://www.w3.org recommend that you DONT
  SPECIFY A FILE TYPE TYPE in your HREFs.
 
  Cool URIs Dont change - http://www.w3.org/Provider/Style/URI
  Good!!
A HREF=/somepage Some Page!/A
  NOT good!
A HREF=/somepage.html Some Page!/A
^
  Let the server decide which page to dish.
  Then it's easy peasy to replace xxx.html with xxx.php or even
  xxx.my_new_language_of_the_moment.
 };
 
 e
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]