Jay Garcia wrote:

> Beauregard T. Shagnasty wrote:
>>>>>> # Process .html files as php
>>>>>> AddHandler application/x-httpd-php5 .html .php .htm
>>>>> 
>>>>> The only problem one will run into with that htaccess entry is if
>>>>> you access a MySQL database from your PHP page(s).
>>>> 
>>>> Why would that be? I use MySQL on most of my sites and there is
>>>> nary a glitch. If yours give problems, there must be something
>>>> amiss with your code. Are your files HTML pages with some embedded
>>>> PHP, or are they PHP scripts that have embedded/outputted HTML?
>>>> Mine are all the latter. What I mean is, the first line of them
>>>> all is:   <?php
>>> 
>>> What I'm getting at is that the htaccess entry is faking the system
>> 
>> Sort of true.  :-0
> 
> Akin to editing the UA string to make sites "believe" you're running
> that which is required.
> 
>>> which does not make the actual PHP => MySQL compliant.
>> 
>> I've not heard that. Do you have a reference?
> 
> It only makes the site(s) believe you're running PHP 5 but the actual
> programming isn't PHP 5 compliant and "may" cause compatibiity issues,
> rare yes, but still happens at times. I have one client that had to
> restructure his PHP slightly to NOT have MySQL errors display on the
> page(s) of his site.

Oh. I think you misinterpreted my post. My .htaccess line is not about
masking PHP4 as PHP5. It is about using .html filenames and processing
as if they were .php (file extension) files, such as index.php

Example:  index.html is actually a PHP script ( <?php ... ) and is
processed directly by PHP -- in my sample, by the PHP5 that is on the
server. If it was PHP4 on the server, I'd use application/x-httpd-php4
or no number at all.

http://www.besthostratings.com/articles/php-in-html-files.html

-- 
   -bts
   -Four wheels carry the body; two wheels move the soul
_______________________________________________
support-seamonkey mailing list
[email protected]
https://lists.mozilla.org/listinfo/support-seamonkey

Reply via email to