Thursday, October 11, 2007

PHP Install

After much trial and tribulation, I was finally able to get PHP working on the server. You wouldn’t think it would be that complicated. Let me start off by telling you what not to do: DO NOT attempt to install PHP by using their executable installation. After trying and failing (twice), I learned that the only way to fly is to download the zipped version that contains all of the application files and do that install manually. I don’t know why they even offer the executable, because apparently nobody on the web can get it to work right either.


Another confusing part of a failed PHP installation is that If IE does not know how to handle the PHP file, which is does not by default, it returns a “file not found” error. It should return an error that says something along the lines of “unrecognized file type” to avoid making you think that you have named the file incorrectly, typed in the wrong URL, or set the permissions incorrectly.

The files can be downloaded from: http://www.php.net/ The current stable version is 5.2.4


I was able to find some EXTREMELY well written manual install instructions here: http://www.peterguy.com/php/install_IIS6.html#phpInstall Did I mention that are EXTREMELY well written? This guy gives an excellent step by step manual install of PHP on an IIS 6.0 server. It involves copying the install files, editing the PHP ini files, and teaching IIS how to handle web pages with .php file extensions. It also has special notes for extensions that will allow IIS to work with MySQL, which we will need in the next step. Some of the steps in his guide (such as the browscap procedures) may not be necessary for our task, but I went ahead and installed everything to ensure compatibility in anticipation of our upcoming additions. My web server is now able to handle PHP files and has compatibility extensions for nearly every software package known to man.


Coming up next: MySQL database

No comments: