By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,403 Members | 880 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,403 IT Pros & Developers. It's quick & easy.

Parsing PHP with HTML file extension

P: n/a
It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You Get -
for my fellow stupids) html editor. But I was told that you HAD to rename
your files to .PHP so they would be parsed correctly. Oh contraire if you
are hosted by Apache and have some access to the .htaccess file mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page makes
only small use of PHP but it sure makes life easier for simple calls out to
PHP resources.

Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html

Still stupid and lazy
Len Bell
Jun 2 '08 #1
Share this Question
Share on Google+
29 Replies


P: n/a
lenbell schreef:
It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You Get -
for my fellow stupids) html editor. But I was told that you HAD to rename
your files to .PHP so they would be parsed correctly. Oh contraire if you
are hosted by Apache and have some access to the .htaccess file mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"
Hi old stupid ;-)

>
I guess (from what I read) that this is only a good idea if your page makes
only small use of PHP but it sure makes life easier for simple calls out to
PHP resources.
Yes, that is possible.
But passing full HTML files through PHP gives your server a lot of
unneeded overhead.
Your server must now read the WHOLE html file and check if it contains
php tags: <?php

So, yes, it is possible, but not very nice for your server.

But I fail to see why you give your files the extension html if they
contain php. Isn't that very confusing?
The fact you use a What-you-see-is-what-you-sometimes-get-editor is no
reason.

So why do you want that setup anyway?

Regards,
Erwin Moller
>
Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html

Still stupid and lazy
Len Bell

Jun 2 '08 #2

P: n/a
lenbell wrote:
It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What
You Get - for my fellow stupids) html editor. But I was told that
you HAD to rename your files to .PHP so they would be parsed
correctly. Oh contraire if you are hosted by Apache and have some
access to the .htaccess file mechanism
In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page
makes only small use of PHP
On the contrary, it is a tremendous waste of resources. It means that every
html file has to be scanned by the interpreter to see if there is any php in
it. Since there hardly ever will be, you will be slowing down all your pages
for no good reason.

And hey, you managed to write a whole paragraph! Your disability is
obviously improving! Very soon you might actually come up with something
sensible to write!
Jun 2 '08 #3

P: n/a
On Wed, 28 May 2008 08:24:27 -0400, lenbell wrote:
It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You Get -
for my fellow stupids) html editor. But I was told that you HAD to rename
your files to .PHP so they would be parsed correctly. Oh contraire if you
are hosted by Apache and have some access to the .htaccess file mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page makes
only small use of PHP but it sure makes life easier for simple calls out to
PHP resources.

Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html

Still stupid and lazy
Len Bell
The reason for recommending against this is that it's not possible on
all hosts, and many properly-configured systems won't allow this. It
/also/ does increase the processing load somewhat by parsing all pages
looking for php open tags, but that's pretty minor in the scheme of
things.

--
Tomorrow is the first day of the rest of your life in a career where, if you
really suck, 100% of your work fails and if you're really good and really
lucky only 99% of it is a complete waste of time. - Hal Bogerd
Jun 2 '08 #4

P: n/a

"Paul Lautman" <pa**********@btinternet.comwrote in message
news:6a*************@mid.individual.net...
lenbell wrote:
>It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What
You Get - for my fellow stupids) html editor. But I was told that
you HAD to rename your files to .PHP so they would be parsed
correctly. Oh contraire if you are hosted by Apache and have some
access to the .htaccess file mechanism
In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page
makes only small use of PHP
On the contrary, it is a tremendous waste of resources. It means that
every html file has to be scanned by the interpreter to see if there is
any php in it. Since there hardly ever will be, you will be slowing down
all your pages for no good reason.

And hey, you managed to write a whole paragraph! Your disability is
obviously improving! Very soon you might actually come up with something
sensible to write!
Eat me
Jun 2 '08 #5

P: n/a

"lenbell" <ls****@charter.netwrote in message
news:X9***********@newsfe05.lga...
It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You
Get - for my fellow stupids) html editor. But I was told that you HAD to
rename your files to .PHP so they would be parsed correctly. Oh contraire
if you are hosted by Apache and have some access to the .htaccess file
mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page
makes only small use of PHP but it sure makes life easier for simple calls
out to PHP resources.

Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html

Still stupid and lazy
Len Bell
The waist or resources complaint is valid in some cases but in my site I
will be using maybe 15 straight HTML pages and probably 100 PHP pages. The
15 HTML pages will change often and are quite busy.

Further I think it may be a useful tool during development and then could be
"Deleted" at some point.

Len
Jun 2 '08 #6

P: n/a
lenbell wrote:
It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You Get -
for my fellow stupids) html editor. But I was told that you HAD to rename
your files to .PHP so they would be parsed correctly. Oh contraire if you
are hosted by Apache and have some access to the .htaccess file mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page makes
only small use of PHP but it sure makes life easier for simple calls out to
PHP resources.

Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html

Still stupid and lazy
Len Bell

Uh, lenbell, you were not told that you HAD to rename your files to
..PHP. You were told that you HAD to rename your files to .php UNLESS
you did special things on the host. That meant mucking with the
..htaccess file. It is NOT a good idea. It is best to have ALL php
files end with the php extension -- but no one said you HAD to do it.

Go back and read the responses. I, for one, said that.
Jun 2 '08 #7

P: n/a
..oO(Peter H. Coffin)
>The reason for recommending against this is that it's not possible on
all hosts, and many properly-configured systems won't allow this.
IMHO a properly configured system _does_ allow it. Otherwise I won't
host any sites there.

Micha
Jun 2 '08 #8

P: n/a
..oO(Erwin Moller)
>Yes, that is possible.
But passing full HTML files through PHP gives your server a lot of
unneeded overhead.
If PHP is used on most if not all pages on the site and the server has
to parse them all anyway, then there's nothing wrong with such a setup.
Of course there are other and better options.
>Your server must now read the WHOLE html file and check if it contains
php tags: <?php

So, yes, it is possible, but not very nice for your server.

But I fail to see why you give your files the extension html if they
contain php. Isn't that very confusing?
It's the easiest way to achieve nicer URLs. A ".html" in a URL is better
than ".php" for various reasons (although even better would be no file
extension at all in the URLs).

Another option would be MultiViews on Apache servers, which allows to
have filenames like

foo.html.php
bar.html.shtml

which you can still access as "foo.html" and "bar.html" or even just
"foo" and "bar". The server can still find them and handle them properly
according to their file extensions. That way you can easily mix static
and dynamic pages of all kinds without revealing such technical details
to the site visitors.

Micha
Jun 2 '08 #9

P: n/a
lenbell wrote:
"lenbell" <ls****@charter.netwrote in message
news:X9***********@newsfe05.lga...
>It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You
Get - for my fellow stupids) html editor. But I was told that you HAD to
rename your files to .PHP so they would be parsed correctly. Oh contraire
if you are hosted by Apache and have some access to the .htaccess file
mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page
makes only small use of PHP but it sure makes life easier for simple calls
out to PHP resources.

Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html

Still stupid and lazy
Len Bell
The waist or resources complaint is valid in some cases but in my site I
Since you have already classified yourself, I will violate net protocol
and tell you that the word is "waste", not "waist".
will be using maybe 15 straight HTML pages and probably 100 PHP pages. The
15 HTML pages will change often and are quite busy.
So?
>
Further I think it may be a useful tool during development and then could be
"Deleted" at some point.
Deliberately doing something the wrong way and then going back and
correcting it usually means you will miss something and it will break.
How is this any more of a "useful tool" than calling html as html and
php as php? What is to be gained by calling php as html? In fact, all
you are doing is adding confusion. I, as a developer, when I see a .php
extension I expect to find php code and when I see a .html or .htm
extension expect to find NO php.

Why do you insist upon calling a banana an apple because in your
specialized dictionary you say to treat all apples as bananas?

>
Len

Jun 2 '08 #10

P: n/a
Michael Fesser wrote:
It's the easiest way to achieve nicer URLs. A ".html" in a URL is better
than ".php" for various reasons (although even better would be no file
extension at all in the URLs).
I'm curious:

How is it 'nicer'?
Why is ".html" better than ".php"?
Why is not extension even better?
Jun 2 '08 #11

P: n/a

<sheldonlgwrote in message >Still stupid and lazy
>Len Bell

Uh, lenbell, you were not told that you HAD to rename your files to .PHP.
You were told that you HAD to rename your files to .php UNLESS you did
special things on the host. That meant mucking with the .htaccess file.
It is NOT a good idea. It is best to have ALL php files end with the php
extension -- but no one said you HAD to do it.

Go back and read the responses. I, for one, said that.
Uh sheldonlg

I'm Still stupid after all these messages <smile>

I know - I just put that out for those newbee's like me that might want to
keep using WYSIWYG editors and those that need only a little PHP in their
page.

Why are you people so uptight?

Len
Jun 2 '08 #12

P: n/a

<sheldonlgwrote in message
news:o7******************************@giganews.com ...
lenbell wrote:
>"lenbell" <ls****@charter.netwrote in message
news:X9***********@newsfe05.lga...
>>It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You
Get - for my fellow stupids) html editor. But I was told that you HAD
to rename your files to .PHP so they would be parsed correctly. Oh
contraire if you are hosted by Apache and have some access to the
.htaccess file mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page
makes only small use of PHP but it sure makes life easier for simple
calls out to PHP resources.

Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html

Still stupid and lazy
Len Bell
The waist or resources complaint is valid in some cases but in my site I

Since you have already classified yourself, I will violate net protocol
and tell you that the word is "waste", not "waist".
>will be using maybe 15 straight HTML pages and probably 100 PHP pages.
The 15 HTML pages will change often and are quite busy.

So?
>>
Further I think it may be a useful tool during development and then could
be "Deleted" at some point.

Deliberately doing something the wrong way and then going back and
correcting it usually means you will miss something and it will break. How
is this any more of a "useful tool" than calling html as html and php as
php? What is to be gained by calling php as html? In fact, all you are
doing is adding confusion. I, as a developer, when I see a .php extension
I expect to find php code and when I see a .html or .htm extension expect
to find NO php.

Why do you insist upon calling a banana an apple because in your
specialized dictionary you say to treat all apples as bananas?

>>
Len
Why are you so uptight?
Spell checkers don't check for stupid now do they

Len
Jun 2 '08 #13

P: n/a
lenbell wrote:
<sheldonlgwrote in message >Still stupid and lazy
>>Len Bell
Uh, lenbell, you were not told that you HAD to rename your files to .PHP.
You were told that you HAD to rename your files to .php UNLESS you did
special things on the host. That meant mucking with the .htaccess file.
It is NOT a good idea. It is best to have ALL php files end with the php
extension -- but no one said you HAD to do it.

Go back and read the responses. I, for one, said that.

Uh sheldonlg

I'm Still stupid after all these messages <smile>

I know - I just put that out for those newbee's like me that might want to
keep using WYSIWYG editors and those that need only a little PHP in their
page.

Why are you people so uptight?

Len
It is not being "uptight". You might call it a reaction to
"unwarranted, bad-choice stubbornness". Tell you what, go ahead and do
it your way. Remember WYDISWYG. (D=do).
Jun 2 '08 #14

P: n/a

<sheldonlgwrote in message
news:o7******************************@giganews.com ...
lenbell wrote:
><sheldonlgwrote in message >Still stupid and lazy
>>>Len Bell
Uh, lenbell, you were not told that you HAD to rename your files to
.PHP. You were told that you HAD to rename your files to .php UNLESS you
did special things on the host. That meant mucking with the .htaccess
file. It is NOT a good idea. It is best to have ALL php files end with
the php extension -- but no one said you HAD to do it.

Go back and read the responses. I, for one, said that.

Uh sheldonlg

I'm Still stupid after all these messages <smile>

I know - I just put that out for those newbee's like me that might want
to keep using WYSIWYG editors and those that need only a little PHP in
their page.

Why are you people so uptight?

Len

It is not being "uptight". You might call it a reaction to "unwarranted,
bad-choice stubbornness". Tell you what, go ahead and do it your way.
Remember WYDISWYG. (D=do).
Do the words judgmental, arrogant and condescending mean anything to you?
Jun 2 '08 #15

P: n/a
lenbell wrote:
<sheldonlgwrote in message
news:o7******************************@giganews.com ...
>lenbell wrote:
>><sheldonlgwrote in message >Still stupid and lazy
Len Bell
Uh, lenbell, you were not told that you HAD to rename your files to
.PHP. You were told that you HAD to rename your files to .php
UNLESS you did special things on the host. That meant mucking
with the .htaccess file. It is NOT a good idea. It is best to
have ALL php files end with the php extension -- but no one said
you HAD to do it.
Go back and read the responses. I, for one, said that.

Uh sheldonlg

I'm Still stupid after all these messages <smile>

I know - I just put that out for those newbee's like me that might
want to keep using WYSIWYG editors and those that need only a
little PHP in their page.

Why are you people so uptight?

Len

It is not being "uptight". You might call it a reaction to
"unwarranted, bad-choice stubbornness". Tell you what, go ahead and
do it your way. Remember WYDISWYG. (D=do).

Do the words judgmental, arrogant and condescending mean anything to
you?
Do the words, stubborn, argumentative prat mean anything to you?
Jun 2 '08 #16

P: n/a
lenbell wrote:
<sheldonlgwrote in message >Still stupid and lazy
>>Len Bell
Uh, lenbell, you were not told that you HAD to rename your files to .PHP.
You were told that you HAD to rename your files to .php UNLESS you did
special things on the host. That meant mucking with the .htaccess file.
It is NOT a good idea. It is best to have ALL php files end with the php
extension -- but no one said you HAD to do it.

Go back and read the responses. I, for one, said that.

Uh sheldonlg

I'm Still stupid after all these messages <smile>

I know - I just put that out for those newbee's like me that might want to
keep using WYSIWYG editors and those that need only a little PHP in their
page.

Why are you people so uptight?
Because you suggested a solution in a public place, which should not be
followed, and might confuse people new to the material, of worse yet,
encourage them follow it... Our responses are not only for you, but also
for the people searching for answers, finding your suggestion, and they
should be discouraged to go this route.

Another reason is of course that every with some years PHP coding
usually has cursed predecessors for the use of this kind of ugly
solutions / hacks. I also think encouraging proper coding standards are
a big reason why seasoned developers with seldomly a question of their
own still frequent this group. The more people are coding properly, the
less chance I'll have to thwack previous coders on future projects :)
--
Rik Wasmus
....spamrun finished
Jun 2 '08 #17

P: n/a
lenbell a écrit :
The waist or resources complaint is valid in some cases but in my site I
will be using maybe 15 straight HTML pages and probably 100 PHP pages. The
15 HTML pages will change often and are quite busy.

Further I think it may be a useful tool during development and then could be
"Deleted" at some point.
Still it's better imo (and off-topic) to use URL rewriting to redirect a
..html to a .php and make exceptions for real .html files. No waste at
all, and the same exact behaviour.

Regards,
--
Guillaume
Jun 2 '08 #18

P: n/a

"Paul Lautman" <pa**********@btinternet.comwrote in message
news:6a*************@mid.individual.net...
lenbell wrote:
><sheldonlgwrote in message
news:o7******************************@giganews.co m...
>>lenbell wrote:
<sheldonlgwrote in message >Still stupid and lazy
>Len Bell
Uh, lenbell, you were not told that you HAD to rename your files to
.PHP. You were told that you HAD to rename your files to .php
UNLESS you did special things on the host. That meant mucking
with the .htaccess file. It is NOT a good idea. It is best to
have ALL php files end with the php extension -- but no one said
you HAD to do it.
Go back and read the responses. I, for one, said that.

Uh sheldonlg

I'm Still stupid after all these messages <smile>

I know - I just put that out for those newbee's like me that might
want to keep using WYSIWYG editors and those that need only a
little PHP in their page.

Why are you people so uptight?

Len

It is not being "uptight". You might call it a reaction to
"unwarranted, bad-choice stubbornness". Tell you what, go ahead and
do it your way. Remember WYDISWYG. (D=do).

Do the words judgmental, arrogant and condescending mean anything to
you?

Do the words, stubborn, argumentative prat mean anything to you?
Yes they do and now I'm severely hurt :(
eat me
Now I feel better :)
Jun 2 '08 #19

P: n/a

"Guillaume" <gg*****@NOSPAM.gmail.com.INVALIDwrote in message
news:g1**********@biggoron.nerim.net...
lenbell a écrit :
>The waist or resources complaint is valid in some cases but in my site I
will be using maybe 15 straight HTML pages and probably 100 PHP pages.
The 15 HTML pages will change often and are quite busy.

Further I think it may be a useful tool during development and then could
be "Deleted" at some point.

Still it's better imo (and off-topic) to use URL rewriting to redirect a
.html to a .php and make exceptions for real .html files. No waste at all,
and the same exact behaviour.

Regards,
--
Guillaume
I'm admittedly stupid <smile>

But I don't understand what you just said

I wonder if there is a newsgroup for PHP dummies?

Len
Jun 2 '08 #20

P: n/a
Peter H. Coffin wrote:
or transcribed by elves on the fly from a big book
chained to a table.
But Elves can catch terrible bugs!


Jun 2 '08 #21

P: n/a
On Wed, 28 May 2008 17:03:56 +0100, Paul Lautman wrote:
Peter H. Coffin wrote:
>or transcribed by elves on the fly from a big book
chained to a table.

But Elves can catch terrible bugs!
Not if you give them a bath at least once a week.

--
Yes, Java is so bulletproofed that to a C programmer it feels like being in a
straightjacket, but it's a really comfy and warm straightjacket, and the world
would be a safer place if everyone was straightjacketed most of the time.
-- Mark 'Kamikaze' Hughes
Jun 2 '08 #22

P: n/a
Peter H. Coffin wrote:
On Wed, 28 May 2008 08:24:27 -0400, lenbell wrote:
>It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You Get -
for my fellow stupids) html editor. But I was told that you HAD to rename
your files to .PHP so they would be parsed correctly. Oh contraire if you
are hosted by Apache and have some access to the .htaccess file mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page makes
only small use of PHP but it sure makes life easier for simple calls out to
PHP resources.

Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html

Still stupid and lazy
Len Bell

The reason for recommending against this is that it's not possible on
all hosts, and many properly-configured systems won't allow this. It
/also/ does increase the processing load somewhat by parsing all pages
looking for php open tags, but that's pretty minor in the scheme of
things.
Actually, there is a significant amount of overhead. Not only does the
interpreter have to parse the pages for php tags, but it has to set up
the entire environment ($_SERVER, $GET, etc.) for every page. That's a
bit of work, also.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 2 '08 #23

P: n/a
..oO(Peter H. Coffin)
>On Wed, 28 May 2008 17:47:52 +0200, Michael Fesser wrote:
>.oO(Peter H. Coffin)
>>>In which case, the *right* way, I'd think, would be manage "pages" as
subdirectories, with proper index.* files handling producing the
content. http://www.example.com/this_collection/this_page/ is entirely
apathetic about whether the underlying bits are html, php, python, perl,
COBOL, or transcribed by elves on the fly from a big book chained to a
table.

You want to create a subdirectory and an index file for every single
page?

Sure. http://www.example.com/this_collection/this_page/ isn't any harder
to manage than http://www.example.com/this_collection/this_page.php
For me it would be, if I would have to maintain two things instead of
one for every single page. It also makes it more inconvenient to handle
in any IDE if you have to open another directory to get to the actual
file content. YMMV.
>It's less typing even.
An <http://www.example.com/this_collection/this_pageis the shortest
variant here, which is what I use on my sites. Easy and simple.

Micha
Jun 2 '08 #24

P: n/a
lenbell a écrit :
>Still it's better imo (and off-topic) to use URL rewriting to redirect a
.html to a .php and make exceptions for real .html files. No waste at all,
and the same exact behaviour.

I'm admittedly stupid <smile>

But I don't understand what you just said

I wonder if there is a newsgroup for PHP dummies?
As said, it's off-topic. URL Rewriting is an Apache process, not PHP. I
therefore invite you to search about it on Google or check an Apache
newsgroup.

Regards,
--
Guillaume
Jun 2 '08 #25

P: n/a
Peter H. Coffin wrote:
On Wed, 28 May 2008 17:03:56 +0100, Paul Lautman wrote:
>Peter H. Coffin wrote:
>>or transcribed by elves on the fly from a big book
chained to a table.

But Elves can catch terrible bugs!

Not if you give them a bath at least once a week.
My ones have a bath once a year, whether they need it or not!
Jun 2 '08 #26

P: n/a
Peter H. Coffin:
In which case, the *right* way, I'd think, would be manage "pages" as
subdirectories, with proper index.* files handling producing the
content.
I don't agree, if only because files named "index" are, by and large,
not indexes. But that would be *your* problem, in *your* filename,
hidden from the world, in *their* URL.

--
Jock
Jun 2 '08 #27

P: n/a
sheldonlg:
Michael Fesser wrote:
(although even better would be no file extension at all in the URLs).

Why is not extension even better?
Because they break the rules that URLs should be short, they should be
easy to remember, and they should last. Without them, URLs are
shorter, more easily remembered, and longer lasting (since more can
change while the URL stays meaningful).

--
Jock
Jun 2 '08 #28

P: n/a
On Wed, 28 May 2008 10:12:32 -0400, "lenbell" <ls****@charter.net>
wrote in <hL***********@newsfe05.lga>:
>
"Paul Lautman" <pa**********@btinternet.comwrote in message
news:6a*************@mid.individual.net...
>lenbell wrote:
>><sheldonlgwrote in message
news:o7******************************@giganews.c om...
lenbell wrote:
<sheldonlgwrote in message >Still stupid and lazy
>>Len Bell
>Uh, lenbell, you were not told that you HAD to rename your files to
>.PHP. You were told that you HAD to rename your files to .php
>UNLESS you did special things on the host. That meant mucking
>with the .htaccess file. It is NOT a good idea. It is best to
>have ALL php files end with the php extension -- but no one said
>you HAD to do it.
>Go back and read the responses. I, for one, said that.
>
Uh sheldonlg
>
I'm Still stupid after all these messages <smile>
>
I know - I just put that out for those newbee's like me that might
want to keep using WYSIWYG editors and those that need only a
little PHP in their page.
>
Why are you people so uptight?
>
Len

It is not being "uptight". You might call it a reaction to
"unwarranted, bad-choice stubbornness". Tell you what, go ahead and
do it your way. Remember WYDISWYG. (D=do).

Do the words judgmental, arrogant and condescending mean anything to
you?

Do the words, stubborn, argumentative prat mean anything to you?

Yes they do and now I'm severely hurt :(
eat me
Now I feel better :)
When you say that you're stupid, you're joking. The sad part is that
you're acting fairly stupidly. You've posted a solution to your
problem in a group of people that know far more than you. Then, when
you're told that your solution has some serious problems and those
problems are explained to you, you argue with the very people that you
acknowledge as being more informed, calling them "uptight",
"judgmental", "arrogant" and "condescending".

Actually, I think the person behaving arrogantly here is you. Peter
Coffin, Michael Fesser, Rik Wasmus and the others posting here know
what they're doing. You don't, and yet you argue with and insult
them. That's arrogant.
--
Charles Calvert | Software Design/Development
Celtic Wolf, Inc. | Project Management
http://www.celticwolf.com/ | Technical Writing
(703) 580-0210 | Research
Jun 27 '08 #29

P: n/a
Greetings, Erwin Moller.
In reply to Your message dated Wednesday, May 28, 2008, 16:34:06,
lenbell schreef:
>It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You Get -
for my fellow stupids) html editor. But I was told that you HAD to rename
your files to .PHP so they would be parsed correctly. Oh contraire if you
are hosted by Apache and have some access to the .htaccess file mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"
Hi old stupid ;-)
>>
I guess (from what I read) that this is only a good idea if your page makes
only small use of PHP but it sure makes life easier for simple calls out to
PHP resources.
Yes, that is possible.
But passing full HTML files through PHP gives your server a lot of
unneeded overhead.
Your server must now read the WHOLE html file and check if it contains
php tags: <?php
So, yes, it is possible, but not very nice for your server.
But I fail to see why you give your files the extension html if they
contain php. Isn't that very confusing?
The fact you use a What-you-see-is-what-you-sometimes-get-editor is no
reason.
So why do you want that setup anyway?
>Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html
Well, enough were said already, i'll add one bit that typically not used and
not known by many.

I on my server use Apache filter module rather than Apache handler for PHP, it
giving me best possible flexibility.
One of the sites served on my server very old, it was started from a few
informative .html pages. Now it has some automatization, but for visitor it's
still looks the same, and all data available at the same addresses.
Noone know it was redesigned and in huge part - stored in db instead of plain
pages.
I may even tell Apache to parse one random file as PHP (and I did that for a
set of .csv and .xml files before I fully understand the power of URL
rewriting), so not much of a load for server.
It is used only where I want it. And where I don't want it (i.e. in upload
storage folder), I can easily disable PHP at all by removing any filters from
files.
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Jun 27 '08 #30

This discussion thread is closed

Replies have been disabled for this discussion.