Search:
Main Menu
Login | RSS |

Quick PHP Code Tips and Examples

PHP Programming Tips, Tutorials and Source Code Examples for newbie

How to switch to PHP5 in Cpanel based web hosting

May 9th, 2007 by Jon Moffet

Some web hosting provider such as e-ruang offers choices of using PHP4 or or PHP5 in their hosting. To avoid conflict with existing scripts, they will usually offer PHP 4 by default.

But for obvious reasons, you may want to use PHP5 as it supports more functionalities and more robust than PHP4. To enable PHP5 for your account, you need to create a .htaccess file containing :

CODE:
  1. AddHandler application/x-httpd-php5 .php .php4 .php3 .phtml

Save the .htaccess file, and upload it to the root directory of your server.

Then upload a php file containing phpinfo() function to test whether PHP5 has been enabled or not. If the modification has not been successful then you should contact your web hosting provider and ask about the appropriate way to activate PHP5 functionality.

Tags: , , ,

Bookmark Post:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • NewsVine
  • Reddit
  • Netvouz
  • Spurl
  • Furl
  • digg
  • YahooMyWeb
  • del.icio.us

Posted in Uncategorized |

Related Posts

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.