How both PHP 4 and PHP 5 sites run on the same Godaddy hosting account ?

2009-06-21


I think your websites are running on PHP 4 or PHP 5. But, How they can run a Godaddy hosting account which you can set multiple websites but you found your hosting might be PHP 4 ?

If you bought a Linux hosting from Godaddy, you are able to build your site on either of PHP 4 or PHP 5.

As long as your site runs Hosting Configuration 2.0, both PHP 4 and PHP 5 applications can run on your site. By default, PHP 5 files require the .php5 extension, whereas the .php extension will run under PHP 4. You can change these defaults through the htaccess file.

By default, files with a .php extension run under PHP 4 and files with the .php5 extension run under PHP 5. The .htaccess file, located at the root of your site, can be used to change these default settings. The following entries in a directory’s .htaccess file designate .php files to run under PHP 5 and .php4 files to run under PHP 4.

AddHandler x-httpd-php5 .php AddHandler x-httpd-php .php4
Changes made to an existing .htaccess file will be seen immediately. When a new .htaccess file is created or an existing .htaccess file is deleted, however, these changes will not be seen until the htaccess cache is cleared. This occurs every hour.

If your site does not run the new hosting configuration and you want to upgrade, you will have to search Godaddy help information to get How to upgrade hosting account to Hosting Configuration 2.0

NOTE: Godaddy Windows hosting and WordPress® hosting offerings only allow PHP 5.