Jump to content

HTML files via PHP engine?


doni49

Recommended Posts

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)

Link to comment
Share on other sites

Why can the files just not have the .php extention instead of .html or .htm?  Seems a little pointles? 

 

There are two reasons.  1) when I first started learning PHP, I was concerned that by showing exactly what scripting language I was using, I would be making it easier for them to hack my sites.  I now have a bunch of HTML files with PHP code in them and would REALLY rather not go through and change them all.  2) From what I've read if the search engines know that a page is scripted, it gives the page a lower rating for the searches (google doesn't like scripted pages).  The way that I have my sites set up, there is NO indication that any page is scripted--although with some of them, one would have to be stupid to believe they're not scripted.

 

But it's a now a moot point anyway.  I sent my host a support request and he fixed it--I'm still not too sure what went wrong. 

Link to comment
Share on other sites

  • 2 months later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.