Web Hosting Forum | Lunarpages
News: October 6, 2008 - Submit Your Site for the October 2008 Site of the Month!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 13, 2008, 09:26:01 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: .htaccess/PHP question  (Read 148 times)
raghus
Spacescooter Operator
*****
Offline Offline

Posts: 48


WWW
« on: July 18, 2008, 09:03:34 PM »

Hi - after the hadar move over this past weekend, my .html files which have embedded php are being server straight up - ie the php is not getting parsed. There seems to be something with my .htaccess. Can someone post their htaccess in which they've specified that .html/.htm files be treated with the php pre-processor? Also do I need to do anything in the cPanel's "Apache Handlers" section?

Thanks!

Raghu
Logged
raghus
Spacescooter Operator
*****
Offline Offline

Posts: 48


WWW
« Reply #1 on: July 18, 2008, 09:15:22 PM »

Also can someone from LP confirm if other upgrades were done on hadar - Apache is at 1.3.4 and PHP is now at  Version 5.2.6 - I thought it was 1.2.x and 4.x before....
Logged
raghus
Spacescooter Operator
*****
Offline Offline

Posts: 48


WWW
« Reply #2 on: July 18, 2008, 10:01:49 PM »

I posted a ticket and got this from LP support:
-----------
Hello,

Hadar was recently migrated to new hardware in our new data center in San Diego. This was done to improve overall stability and performance for all customers on the server. At this time, all services and applications on the server were updated too.

The main issue is that with the upgrade, the path to PHP5 has changed, this is likely the reason why your .htaccess entries failed.

I hope this was helpful.
-----------

What do I need to do to reflect the new path to PHP5. Where do I make this change?
Logged
MrPhil
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3400



« Reply #3 on: July 19, 2008, 07:57:55 AM »

Does your cPanel give you a choice to enable PHP 5? You have to explicitly tell the server to parse (server side) your .html and .htm files, otherwise they will be served up "as is". Was your .htaccess file changed at all by LP when they did the move, or is it as it was?

If you have a choice between PHP 4 and PHP 5, clicking the "enable PHP 5" button in cPanel should give you an entry something like:

AddHandler application/x-httpd-php5 .php5 .php4 .php3 .php2 .php .phtml

Be sure to back up your old .htaccess before doing this, in case cPanel wipes out your old .htaccess. Two things: you'll need to add .html .htm to that list of file extensions. And you may or may not have "application/" in the line.

If you are not given a choice (it's PHP 5 only), I think you can go into the "Apache Handlers" to specify that .html and .htm are to be treated as PHP (parsed server side).
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM