One of my readers pointed out the importance of PHP version numbers when running several modules in Drupal and enabling certain workarounds. I hope I clarified his concern, as a result of this exchange I realized that those of you who run a website on a hosted server with PHP might not know how to determine the PHP version used on your server. This information is very important because it will determine the functionality and compatibility of software that is run on your server. The guide below will show you to determine the PHP version used on your server. If you have any comments or questions, please post them below.
Note: I used Dreamweaver to create the PHP file, CuteFTP to upload it, and 1&1 as my host.
1. Open Dreamweaver or another HTML editor and type the following into an empty document
<? phpinfo(); ?>
You can copy and paste the above statement in its entirety.
2. Save the file by clicking on File > Save As…
3. Navigate to the directory that you would like to save your file to, name the file check_info.php make sure that All Documents is selected as the Save as type: Click on the Save button
Note: You can name the file whatever you would like, but I recommend the above so that you can identify it.
4. Open your favorite FTP program, log on to your server, find the check_info.php file you just created, make sure to also browse to the root directory of your website. To upload using CuteFTP, right click the file and select Upload from the menu.
5. Open your browser and head on over to your website, type the following; http://www.yourwebaddresshere.com/check_info.php into the address bar. You should see a page similar to this that details the PHP version used on your server as well as other parameters.
1&1 Uses the above version of PHP – 5.2.6 as of 11/11/2008