parsing .inc files

Support for webhosts that use CentOS
Post Reply
madal30
Posts: 37
Joined: 2008/12/08 14:06:02

parsing .inc files

Post by madal30 » 2011/01/26 13:16:57

Hello all,

This must be very simple. I have few .inc files for my website. How do i prase .inc files as php so it will be displayed in the browser. Right now, i get all the code.
Madal

madal30
Posts: 37
Joined: 2008/12/08 14:06:02

Re: parsing .inc files

Post by madal30 » 2011/01/27 08:06:50

I just added follwing lines in my httpd.conf file

AddType application/x-httpd-php .php .php3 .phtml .html .htm .inc


looks working

hansolo
Posts: 231
Joined: 2010/01/13 11:17:42
Location: SI

Re: parsing .inc files

Post by hansolo » 2011/01/31 20:55:43

As known to me 'the only' way to make other files than .php to Parse to PHP process
is to make a [b].htaccess file[/b] with such settings only for the site that needs it (you can also rename all the files .inc to .php ?!)
so virtually anything can be passed to PHP parser but how much is going to slow down the site is another question.
Your settings made your Apache server parse every file on every site with extensions: .php .php3 .phtml .html .htm .inc parse to PHP.

Think if that's needed.

good luck

Post Reply

Return to “CentOS 5 - Webhosting Support”