Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
June 30, 2008 - Submit Your Site for the July 08 Site of the Month Award!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 26, 2008, 05:17:07 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: After upgraded to php 5 via cpanel php does not work at all.  (Read 1018 times)
ZenCoder
Space Explorer
***
Offline Offline

Posts: 6


« on: November 10, 2007, 04:08:44 PM »

Awhile back the "Enable/Disable PHP 5" option appeared in my control pannel.
Today I used it to switch to PHP5

As advertised it saved by old htaccess file by renaming it and created a new one with the following code

AddHandler x-httpd-php5 .php

That problem is that instead of upgrading me to php 5 php is completely broken.

No php files are executed.  Instead they browser is offered the opportunity to download the php file many of which contain database passwords!

So I went back to "Enable/Disable PHP 5" and switched back to php 4.

PHP still doesn't work!

Right now I am scrambling to remove all the php files that contain passwords.

Can someone help!

PS I filled out a support ticket

« Last Edit: November 10, 2007, 05:06:52 PM by ZenCoder » Logged
BENNYSOFT
Trekkie
**
Offline Offline

Posts: 17


« Reply #1 on: November 11, 2007, 03:32:56 AM »

Add the line
Code:
AddHandler application/x-httpd-php5 .php
instead of
Code:
AddHandler x-httpd-php5 .php
to your .htaccess file or in cPanel -> Apache Handlers and it works with PHP 5. Wink
Logged
Corey
Newbie
*
Offline Offline

Posts: 5


« Reply #2 on: November 27, 2007, 10:52:45 PM »

I'm having this same problem. I tried what Benny suggested but it didn't work. LunarPages Support is taking too damn long to respond. Anyone have any other suggestions?

UPDATE: Tech support fixed it by making a blank .htaccess and filling it with:
Code:
AddHandler application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml
AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml
Everything works now. Phew...
« Last Edit: November 28, 2007, 10:35:07 AM by Corey » Logged
RichardRay
Support
Intergalactic Cowboy
*****
Offline Offline

Posts: 73



« Reply #3 on: February 14, 2008, 10:45:00 PM »

Just thought I would add... The AddType setting should not be used.. only the AddHandler line.  An Apache handler would be required to run PHP 5 on the server.  Mime types are used to tell the browser how to handle files client-side, so would be useless for PHP (since PHP is a server-side language).  Generally, Apache handlers would be used for files that are to be handled server-side, while Mime types would be used to handle files that are to be handled client-side.
Logged

Lunarpages Web Hosting
Lunarpages Affiliate Program
FAQs | Tutorials | LP Glossary

Telephone: 1-714-521-8150
24 hour Network Status Line: 1-562-697-8106
Fax: 1-714-521-8195
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


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