Apache 2.2.x - 'Compiling mod_auth_mysql'

If you have tried to compile mod_auth_mysql for Apache 2.2.x, you may have noticed that it gives quite a few non-descript compile errors and exits with an even more non-descript and non-helpful error message from apxs.

In order for the module to compile, you must patch the source so that it will be compatible with Apache 2.2.x. The following instructions include locations for the source package and patches for mod_auth_mysql 3.0. I will try to get the patch rewritten for 3.2 in the near future!

wget http://tehhax.com/packages/mod_auth_mysql/mod_auth_mysql-3.0.0.orig.tar....
tar xvzf mod_auth_mysql-3.0.0.orig.tar.gz
cd mod_auth_mysql-3.0.0
wget http://tehhax.com/packages/mod_auth_mysql/apache22.diff
patch -Np0 <apache22.diff
/usr/local/apache/bin/apxs -c -L/usr/lib/mysql -I/usr/include/mysql -lmysqlclient -lm -lz mod_auth_mysql.c
/usr/local/apache/bin/apxs -i mod_auth_mysql.la
echo "LoadModule mysql_auth_module modules/mod_auth_mysql.so" >> /etc/httpd/conf/httpd.conf

Obviously you will want to modify your paths as necessary.

 

And if you decide you do not want to patch this your self, you can get the package here:
http://tehhax.com/packages/mod_auth_mysql/mod_auth_mysql-3.0.0.patched.t...