Maple Hosting Maple Hosting (A Company of Webx Networks)
 HOME  |  ABOUT US  |  HOSTING SERVICES  |  HOSTING PLANS  |  NETWORK  |  SUPPORT  |  CONTACT US 

How to use php5

  1. By default it is accessible using .php5 extension for php files. Just have the php script named something.php5 and viola it will be processed by php5.

  2. To use php5 for all *.php files as default in your entire account, you need to edit ~/public_html/.htaccess file and add this directive:

    # Use PHP5 as default
    AddHandler application/x-httpd-php5 .php

    This will make the server process all files named .php by php5.

    After this change, no files under public_html will be processed by old php4. Please note that preceding marker comment "# Use PHP5 as default" is mandatory.

  3. If you want to use both php4 and php5, you can create a subfolder in public_html say "test5" and add the above mentioned directive in .htaccess there (i.e. public_html/test5/.htaccess). This way php5 will be used only under that "test5" folder and the folder tree under it, and rest of your account will continue to use php4.

  4. register_globals is off by default and will remain off in php5. It is said that php6 will not have register_globals, so it is a good time to fix your scripts not to depend on it.

    For Advanced Users

  5. To make changes to php configuration, you will need to install php.ini in public_html folder (or the DOCUMENT_ROOT of subdomain/addon domain i.e public_html/subdomain). We have placed a typical default php.ini file for php5 here: http://69.73.181.191/php5.txt

    Please rename it to php.ini

    NOTE: In the current php5 implementation, php5 will pick php.ini in the following precedence:

    local folder (higher precedence) > public_html (or DOCUMENT_ROOT) > default global php.ini (at server level)

  6. For shared hosting clients using shared SSL certificate, you will need to change permission of your public_html folder to 755. You can do that from cpanel file manager.

    The default permission is 750 with ownership of userid:nobody.

    While accessing php5 over shared ssl, php5 will pick php.ini from the local folder where php5 file is being executed.

Copyright © 1997-2008 Maple Hosting (A subsidiary of Webx Networks). All rights reserved. SLA | Privacy Policy | Site Map