Posted on Leave a comment

Technically, it’s no so easy

I have a client taking their dynamic site to a trade show on a laptop since they don’t want to rely on the trade show’s wireless connectivity. So, I say, "It’s easy. Just install PHP, MySQL and Apache on your laptop [windows XP]." After 5 hours of hair pulling yesterday I realize that versions on this stuff are as important as they say. Turns out version PHP 5.04 installer for windows does not automatically configure apache. Also apparently apache 2 is better for windows but php likes apache 1.3 better.

I’m returning to PHP 4 for this install.

Ah! Same error:

Sorry, the software to automatically ocnfigure the Apache httpd.conf file has not yet been written. You will have to configure Apache manually. See the install.txt file for more details.

My first pass at this error I got to a stopping point in the install.txt. Had I read further I would have found:

Installing as an Apache module

You should add the following lines to your Apache httpd.conf file:

Example 2-3. PHP as an Apache 1.3.x module

This assumes PHP is installed to c:\php. Adjust the path if this is
not the case.

For PHP 4:
# Add to the end of the LoadModule section
LoadModule php4_module “c:/php/php4apache.dll”

# Add to the end of the AddModule section
AddModule mod_php4.c

For PHP 5:
# Add to the end of the LoadModule section
LoadModule php5_module “c:/php/php5apache.dll”

# Add to the end of the AddModule section
AddModule mod_php5.c

For both:
# Add this line inside the conditional brace
AddType application/x-httpd-php .php

# For syntax highlighted .phps files, also add
AddType application/x-httpd-php-source .phps

So the instructions in the install.txt continue to make no sense with Apache2 referencing files that aren’t there, lines of the httpd.conf that are non-existent and finally I find an exceptional answer that points out:

the problem is that the instructions that come with the php distrubutions only cover installations for Apache 1.3.x and not the 2.0 versions

And further directs us to "Installing Apache 2.0, PHP 4.2, MySQL 3.23, and PHPMyAdmin" by Jeffery F. Hill This looks like an excellent guide!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.