Monday, August 18, 2008

Read the documentation Jim!

I finally was able to get PHP up and running with Apache, but the version of PHP I am using is not what the Crash Course book says to use. Instead of completing a manual installation with PHP 4.4.9, I ended up using the installer package for PHP 5.2.6

The book is based PHP 4.X.X. and Apache 2.0, and not Apache 2.2. If I had paid attention to what version of Apache I installed, and this note on the PHP site, I wouldn't have taken so much time to get PHP installed:

"Note: Apache 2.2.x Support
Users of Apache 2.2.x may use the documentation below except the appropriate DLL file is named php5apache2_2.dll and it only exists as of PHP 5.2.0. See also »"

Trying to install php 4.4.9 using the php4apache2.dll in the httpd.conf Apache config file, just isn't going to work.

Was this a waste of time. No! I am certain I can do a manual install of PHP 4.4.9 on another system, but I have to make sure I am using Apache 2.0.x and not Apache 2.2 I may end up doing this if I have some spare cycles later on.

Several notes to anyone else trying this.
  1. Only print out the PHP installation readme if you want to kill off a forest. (35 pages!)
  2. Try to have two systems running when you do this. One system to install PHP on, and the other to read the install instructions on the site (since the book is a little out of date with regards to the latest version of Apache). This luxery may not be available to everyone, but it sure helps to be able to access site on one monitor while you are installing on another system. This can be done with a single system single or dual monitors, but it saves time if you have reboot the system you are installing PHP on.
  3. Check the errata on the book. There was also a typo regarding the php4apache2.dll. The book has phpapache2.dll not php4apache2.dll.
Well now I move on to installing MySQL. This little delay cost me some time, but it was a learning experience.

No comments: