Lounge Network - Knowledge Base

  View Printer Friendly Version Search
KNOWLEDGE BASE HOME » 15. INFORMATION: SCRIPT AND PROGRAMMING QUESTIONS Viewing Answer
How do I setup PHP5 on my website?

For CPanel Hosting Accounts:
You can switch your website manually to run under PHP 5, by following either of the two methods below.

Option 1:
Login to your cPanel control panel at http://www.web.loungenetwork.co.nz/login-cpanel.php. Then go to the icon that is labeled "PHP Configuration" on the main cPanel page. Click this icon and choose which version of PHP you'd like. When you select PHP5 on this PHP Configuration page, it will be running under suexec_php5.

Option 2:
Add the following two lines to an .htaccess file to force .php files be handled by php5.

AddType application/x-httpd-php5 .php
AddHandler application/x-httpd-php5 .php


Then upload this .htaccess file into your public_html folder. This will then enable PHP 5.
You can create an .htaccess file in any standard text editor, or in your web design software. Just make sure you save the file as .htaccess (don't forget the dot at the beginning). Also make sure your text editor doesn't add an extension at the end of the file name, such as .txt, otherwise the .htaccess file will not work. After you have FTPed the file into you public_html folder, if you are unable to view the file in your FTP software, you may need to use the command -al (this command may differ depending on your FTP Software), which will allow you to view all the files in the folder.

You can check that the .htaccess file has taken effect, and has activated PHP 5 by using a phpinfo.php file. You can learn how to setup a phpinfo.php file by clicking here.

Useful Notes:

- If you are using *.ini files on your website. In PHP5 any *.ini file in a directory full replaces the system php.ini .
To implement only your changes from your *.ini - please create a directory named _custom_php_settings (must be typed exactly like this), under the needed directory and move the *.ini in that new folder. Any .ini files will then be included after the system one.




For Corporate and Business Class Hosting Accounts:
To switch your site to PHP 5 please following the instructions at http://knowledgebase.loungenetwork.co.nz/index.php?op=view&t=218



Please note that as PHP5 is third party software, and we don't provide any form of support for it.


KNOWLEDGE BASE HOME » 15. INFORMATION: SCRIPT AND PROGRAMMING QUESTIONS Viewing Answer




Knowledgebase Manager

© Copyright Lounge Network 2001-2017