Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Oct 2006
    Posts
    72

    Default HTML files via PHP engine?

    I've got a strange issue going on and I don't know what to do about it. I'm using a hosting account (server info is quoted below--copy/pasted from CPanel). I've got my main domain and two add-on domains. I HAD all of them config'd to have all HTML files processed via the PHP engine. Last night, the main domain and one add-on domain stopped processing the PHP code that's in the HTML files but one of the add-on domains is still processing the PHP code.

    I could have sworn that I used either "Apache Handlers" or "MIME Type" on the CPanel to do this. But I can't get it to work now. When I created a file called phpinfo.php (with one line: <?php phpinfo(); ?>) and loaded it, it DID work. So the PHP engine IS working.

    Operating system Linux
    Kernel version 2.4.21-47.0.1.ELsmp
    Machine Type i686
    Apache version 1.3.37 (Unix)
    PERL version 5.8.0
    Path to PERL /usr/bin/perl
    Path to sendmail /usr/sbin/sendmail
    Installed Perl Modules Click to View
    PHP version 5.1.6
    MySQL version 5.0.27-standard
    cPanel Build 10.9.0-CURRENT 56
    Theme cPanel X v2.6.0
    cPanel Pro 1.0 (RC36)

  2. #2
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    If you are wanting to parse .HTML files as PHP scripts then you need to have
    the appropriate AddType command in your .htaccess file either in the root page
    of your site or in the folder where the .HTML files are located.

    IE: AddType application/x-httpd-php .html

    Note that the above only works if the server where your site is located is
    running PHP as a standard Apache module.

    If PHP is running as a CGI such as with phpSuExec or SuPHP then your
    adding PHP parsing of HTML files to your .htaccess file will not work!

    (Note: Your phpinfo() page will tell you if PHP is running as a CGI or Module)

Similar Threads & Tags
Similar threads

  1. SuPHP Question - making .html files behave as .php files
    By Doug E in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-02-2010, 09:47 AM
  2. Cannot Parse php within .html files!
    By smartads in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 03-19-2009, 08:24 PM
  3. php files querying to HTML ??
    By Markwaugh in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-06-2003, 01:10 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube