Enable server to parse the html files as php files on Linux 64bit working on XAMPP

I have been struggling hard to enable server to parse the html files as php files on linux 64 bit working on XAMPP. However there is confusion to which file here is the step by step process

Via httpd.conf

  1. For Linux servers using Apache with XAMPP, find a file called httpd.conf. This file should be in the folder called, “conf” in the Apache program files or should be at location  /opt/lampp/etc/original/ and also at location /opt/lampp/etc/ . Also  It may be on the server as /etc/httpd/conf/httpd.conf
  2. You should change at both of these location.
  3. In httpd.conf, find the line that looks like this:
    •  AddType application/x-httpd-php .php
    if you cannot find the above line look for the line 
    • AddType application/x-compress .Z
    • AddType application/x-gzip .gz .tgz
  4. Add the following line below:
      • AddType application/x-httpd-php .html
    • Or alter the AddType application/x-httpd-php .php to:
      • AddType application/x-httpd-php .php .html
  5. After making these changes, restart your web server. For unix based xampp servers, using this command:
    • /opt/lampp/lampp start
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s