Archive for the ‘PHP’ Category.

Can we all get along?

I finally got tired of living with the inability of WordPress to automatically update on this very blog site, which is hosted on 1&1, so I did some digging into the WordPress forums. In addition to the automatic update just hanging up when trying to download the updated zip file, I also would never see anything appear under the WordPress Development Blog and Other WordPress News sections on the right side of the main dashboard.

One of the solutions mentioned was to set up your web site to use PHP5 instead of PHP4. So, I logged into the 1&1 administration panel, but could find no setting for the version of PHP used by my web sites. (My company has sites hosted on Rackspace Cloud, formerly Mosso, which has a nice little choice list on their admin panel to set the PHP version.)

A quick phpinfo() page on my blog site indicated that version 4.x of PHP is used. An equally quick search of the 1&1 FAQs yielded the answer.

You have to put the following line into the .htaccess file in the root of your web site:

AddType x-mapp-php5 .php

Apparently, this makes it appear to 1&1 hosting that all of your PHP files are meant to be run using PHP version 5 instead of version 4, without having to rename all of your files to have a php5 extension instead of php.

Oh, and I hope everyone is having a nice Boxing Day.