php5 with cpanel

This is a discussion on "php5 with cpanel" within the Hosting & Domains section. This forum, and the thread "php5 with cpanel are both part of the Hosting Related category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Hosting Related > Hosting & Domains

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Oct 3rd, 2007, 16:27
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
php5 with cpanel

Is there a way to make cpanel handle all .php files as php5 rather than php4?
I can do this by renaming them all to .php5 but that would take ages!
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Oct 3rd, 2007, 17:34
Elite Veteran
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Re: php5 with cpanel

This would be a great question to ask me...your host! By default on new hosting accounts, files ending in the extension .php will be parsed using PHP version 4. Files ending in .php5 will be parsed using PHP version 5. If you wish to override this default and have all files be parsed using PHP5, a .htaccess file can be placed in the directory you wish to use version 5 for .php files (if you want it site wide, just put the .htaccess file in your public_html directory). This .htaccess file needs to contain the following line somewhere in it (if this is all you're using this .htaccess file for, this would be the only line in the file):

Code: Select all
AddHandler application/x-httpd-php5 .php
This will cause Apache to parse .php files as PHP5. As nothing has been specified to the contrary, .php5 files will also still be parsed by PHP5. You can also do this though the command line, but that is more complex.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Oct 3rd, 2007, 17:36
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: php5 with cpanel

Sorry Jacob, I thought you were offline when I asked this.
Will try now
out of interest
Could this also go in the apache handlers section?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Oct 3rd, 2007, 17:37
Elite Veteran
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Re: php5 with cpanel

Don't ask me now...lol. I already told you the answer! ^^
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 22:45.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42