update to first post
I've been experimenting with the build configuration and have finally got Apache running and successfully connecting to MySQL version 4.1 with Perl and DBI.
The crucial setting is the architecture-dependent installation directory. The key point is install Apache using default settings, but configure your new Perl installation to ensure that any architecture-dependent files are placed in a directory that Apache expects.
I found that, if I attempted to configure Apache in any way apart from the defaults, I ran into difficulties. The only thing I needed to set was the installation directory.
So, installing Apache from source involved the 4 commands set out in the installation instructions:
# ./configure --prefix=/usr/local/apache2
# make install
Now, after installing DBI and DBD from source, I tried to run my test DB connection page and got the usual error about being unable to locate the MySQL driver, but this time I paid more attention to which directories Apache was searching to find a suitable driver for MySQL. When I compared them to the directories where Perl 5.8.5 had installed itself, I realised the default Perl installation had stored various bits and pieces in places that Apache wasn't expecting. After reading through installation instructions for Apache and Perl more carefully, I found there is a setting for choosing a location for architecture-dependent files. Perl 5.8.5, by default, creates some directories with names starting with i686 on Fedora Linux but Apache on this distribution is looking for directories based on the name -i386.
I removed my new Perl 5.8.5 installation and deleted everything I could think of related to it, then re-installed, this time choosing an interactive configuration session.
The sequence of commands is:
# rm -f config.sh Policy.sh
# make test
# make install
(In order to enter interactive Configuration mode, you don't type -de after Configure )
You have to stay awake during this because it asks some really obscure questions and often says "if you don't understand this just press return". So, when you get to the questions about the location of the installation directories, slow down, take your time and when they ask about the architecture-dependent installation directory, type:
This time, perl installed itself in a directory called /usr/lib/perl5 and created some sub-directories called -i386-linux-thread-multi instead of -i686-linux-thread-multi and hey presto after re-installing DBI and the MySQL DBD module, Apache was able to find the driver it needs to run my test SELECT query.
I've seen many posts in many forums over the last week with a very similar error running Apache with Perl or Python MySQL or PosgreSQL etc so it could be that the solution is to re-build the relevant scripting language (Perl or whatever) but ensure that it's configured to put architecture-dependent files in a location that Apache is expecting.
Hope this helps someone. It's taken me about 10 days of rather late nights to get this to work.
Last edited by David Mann; 11-10-2004 at 09:24 PM.