As part of our commitment to maintaining our servers with the latest technologies available, we have developed an implementation of PHP 5.3 that also allows full retention of PHP 5.2 support. The deployment will make PHP 5.3 the servers default PHP handler and a simple htaccess option is available that provides the ability to revert to PHP 5.2.
However, in the interest of avoiding likely issues of sites breaking due to incompatibilities with PHP 5.3, what we will be doing is setting the htaccess option on all sites to force PHP 5.2 usage, which will effectively mean nothing will have changed for you compatibility wise. Then, when and if you decide that PHP 5.3 is something you would like to use or experiment with, you may remove the entry from your sites htaccess file.
During our installation of the combined PHP 5.3/5.2 setup, we will check to see if a .htaccess file exists under your users public_html ( /home/user/public_html/.htaccess ), if one does not exist, we will create it for you. Then, the new PHP 5.2 handler type will be added/appended to the .htaccess file ( AddType application/x-httpd-php52 .php ), this will force the account to utilize PHP 5.2, it will be inherited by all paths under your public_html
That is it! If at any time you want to test your domain with PHP 5.3, you simply remove the entry from the htaccess file -- if the content you are testing breaks, just re-add it and you will be back on 5.2. As always, if confused or in doubt about any of this, please reply here or open a support ticket and we will be glad to assist you.
PHP 5.2 handler type:
AddType application/x-httpd-php52 .php
PHP 5.3 handler type:
AddType application/x-httpd-php5 .php
- If you have the 5.2 type set in your public_html/.htaccess, and would like to test 5.3 on PHP scripts in, for example, public_html/test/, then you would create a public_html/test/.htaccess and add 'AddType application/x-httpd-php5 .php' to it. Now, the test/ path will be forced to 5.3.
- If you would like to have 5.3 as the default across your site, you only need to remove the 'AddType application/x-httpd-php52 .php' entry from public_html/.htaccess and the entire site will then default to 5.3. As with above , you can set the .htaccess in any specific path and add the 5.2 handler to force that version in just that path.
- For PHP options specific to 5.2 and 5.3, you can create php.ini files as needed in the applicable paths, for example, if you have the 5.2 handler type set under public_html/oldapplication/, you can drop a php.ini file into that path and its options will apply to PHP requests under that path.
Once again, the bottom line here is that, be default, everything will be transparent and PHP 5.2 will remain the version your sites run unless you explicitly remove the 5.2 handler from your .htaccess file. Further reading on features that have changed in PHP 5.3 can be found at: http://www.php.net/manual/en/migration53.deprecated.php