You are Here:
FAQ
Scripting & Programming
.htaccess
Article #7
How do I enable PHP5? Linux Packages Only!
This includes:
With 1&1 Linux hosting packages, you have the choice between PHP 4.4, PHP 5.2 and PHP 5.4. 1&1 Web Hosting packages use PHP4 as default for all .php files. For more information about PHP5, please reference What's new in PHP5? PHP 5.2 You may choose to simply name the script with the .php5 file extension if there are only a few scripts that require PHP5. If you don't want to rename all your scripts to .php5, you can create a .htaccess file (or edit the existing .htaccess file, if you already have one). You can create this file using a text editor such as Notepad, WordPad, vi, nano, etc. and place the following line in the text file:
Save the text file as .htaccess in the folder where you need to use PHP5 (or upload the file to the correct folder). The settings specified in the .htaccess file are recursive meaning that the settings will apply to the current folder where the file is saved as well as all subfolders. PHP 5.4 When 1&1 first offered the alpha/beta stage of the newest PHP version to its customer base, the final release was planned to be PHP6. Since that time the PHP developers have reevaluated their planned releases and have pushed off PHP6 for some time. Most changes planned for PHP6 have already been incorporated into version 5.3 and 5.4 as there is some uncertainty to when PHP6 can realistically be released. It is because of this reason that the extension .php6 is used to enable PHP 5.4. Similar to above, you can either rename your pages to .php6 in order to enable PHP 5.4 for specific pages or you will need to alter the .htaccess file in order to run all PHP scripts using PHP 5.4:
While the PHP developers have done their utmost to ensure compatibility, we cannot guarantee that PHP4 scripts will function 100% correctly under PHP5. PHP5 has register_globals, allow_url_include and allow_url_fopen all disabled by default which may cause improper functionality for some scripts when switching from PHP4 to PHP5. |
© 2012 1&1 Internet Ltd - About 1&1 Internet