Parse .html file as php5 via .htaccess file

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Parse .html file as php5 via .htaccess file

Postby jean01 » 12. January 2011 22:53

Maintaining a website that has two html files that are set to be parsed through php using the following .htaccess commands:

<Files index.html>
AddType application/x-httpd-php5 .html
</Files>
<Files pagename.html>
AddType application/x-httpd-php5 .html
</Files>
How do I get XAMPP to recognize these commands?

The .htaccess file itself also contains ErrorDocument commands that are behaving properly.

My install is:
XAMPP for Windows Version 1.7.3
Windows 6.0 Build 6002 Platform 2 Service Pack 2
I am running VISTA, if that matters.

Thanks!
jean
PS
jean01
 
Posts: 3
Joined: 03. March 2009 17:22

Re: Parse .html file as php5 via .htaccess file

Postby Sharley » 13. January 2011 03:34

Suggested Google Search

Xampp only uses the one version of PHP and is compiled as a Module not as a CGI.
So x-httpd-php5 is not required, use just x-httpd-php instead.

For some help with creating and correcting your .htaccess file see these links:
How To Parse HTML Files As PHP
Make PHP to work in your HTML files with .htacess

Please post back if you find the solution that allows you to move forward.

Thanks and HTH.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Parse .html file as php5 via .htaccess file

Postby jean01 » 13. January 2011 20:45

Sharley wrote:Xampp only uses the one version of PHP and is compiled as a Module not as a CGI.
So x-httpd-php5 is not required, use just x-httpd-php instead.

AddType application/x-httpd-php .html
works in XAMPP, thanks very much!
The web host still requires
AddType application/x-httpd-php5 .html
I checked and this is indeed because they still offer more than one version of php, as discussed in one of the links you provided:

I'm not, and likely never will be, particularly well versed in Apache so I do have these elementary issues from time to time.
Thanks very much for your help!!
Jean
jean01
 
Posts: 3
Joined: 03. March 2009 17:22


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 106 guests