Helpful Information
 
 
Category: Apache Development
Problem mod_auth_mysql using apxs

I am trying to install mod_auth_mysql on a new FreeBSD 4.2-Release server. I am running MySQL 3.23.33 with Apache 1.3.17 and PHP 4.0.4pl1. The following are my configure scripts:
MySQL
./configure
Apache
./configure --sysconfdir=/etc/httpd --datadir=/home/httpd --logfiledir=/var/log/httpd --enable-module=most --enable-shared=max --disable-rule=WANTHSREGEX --mandir=/usr/share/man

I downloaded mod_auth_mysql-2.20.tar.gz and ran the configure script:
./configure --with-mysql=/usr/local --with-apache=/usr/home/tadams/download/apache_1.3.17

I then ran make. The make ran properly. I then switched to the src/modules/auth_mysql off the apache source directory and ran /usr/local/apache/bin/apxs -c mod_auth_mysql.c. I then changed to the /usr/local/apache/include dir and ran /usr/local/apache/bin/apxs -i -a mod_auth_mysql.so. I then ran apachectl start and got the following message:

Syntax error on line 238 of /etc/httpd/httpd.conf:
Cannot load /usr/local/apache/libexec/mod_auth_mysql.so into server: /usr/local/apache/libexec/mod_auth_mysql.so: Undefined symbol "mysql_store_result"
/usr/local/apache/bin/apachectl start: httpd could not be started

Line 238 of httpd.conf is: LoadModule auth_mysql_module libexec/mod_auth_mysql.so. There is a corresponding line AddModule mod_auth_mysql.c.

If I comment out these lines then Apache starts without a problem. Any help would be greatly appreciated.

>> I am trying to install mod_auth_mysql on a new FreeBSD 4.2-Release server

Then why didn't you follow FreeBSD's PREFIX (/usr/local)?

>> ./configure --with-mysql=/usr/local --with-apache=/usr/home/tadams/download/apache_1.3.17

Your subject stated that you wanted to use apxs but --with-apache is not DSO method.

Since you are running FreeBSD, why don't you remove your installed Apache and reinstall it from ports?

>> --mandir=/usr/share/man

This is non-standard and violates FreeBSD's directory layout. You definitely need to read this thread carefully -> http://forums.devshed.com/showthread.php?threadid=10786, then check out /usr/ports/www/mod_auth_mysql/Makefile.

>>Then why didn't you follow FreeBSD's PREFIX (/usr/local)?

If you'll notice from my configure script I did install it in /usr/local. The default PREFIX is /usr/local so I did not have to specify it.

>>Your subject stated that you wanted to use apxs but --with-apache is not DSO method.

You are correct in that. I was getting the "cp libauth_mysql.so: No such file or directory apxs:Break:Command failed with rc=65536 make:*** [install] Error1 error as I have noticed that several other people have been experiencing. That is why I switched to see if it would compile without apxs. It did.

>>Since you are running FreeBSD, why don't you remove your installed Apache and reinstall it from ports?

If you follow the FreeBSD discussion groups you would know that the ported Apache is one of the big noise makers. Plus using the ports does not give you near the flexibility that compiling from the source does. Simply stated you cannot truly rely upon the ported Apache for an enterprise, dynamic web server.

>>This is non-standard and violates FreeBSD's directory layout. You definitely need to read this thread carefully -> http://forums.devshed.com/showthread.php?threadid=10786, then check out /usr/ports/www/mod_auth_mysql/Makefile.

It is technically not non-standard. I chose to install the man files in that directory so that the other administrators on this system would not have to update the MANPATH in their profile in order to pull up the man pages concerning Apache. I should put them in the /usr/local/man directory instead of the /usr/share/man directory and have modified the script accordingly.

I actually resolved this problem by wiping the system in question. It seemed that there was either some bug in the original OS install or in the Apache install. After reloading the OS and reinstalling all the aforementioned apps (modifying the mod_auth_mysql configure script to use apxs and the Apache script to put the man pages in /usr/local/man) the install went perfectly.

>> if you'll notice from my configure script I did install it in /usr/local

But note, you got this line -> Cannot load /usr/local/apache/libexec/mod_auth_mysql.so into server

The prefix of that is /usr/local/apache
A standard location for mod_auth_mysql.so should reside in /usr/local/libexec/apache/

>> Plus using the ports does not give you near the flexibility that compiling from the source does

Using ports is as dynamic as compiling from src.
1) You can edit /usr/ports/www/apache13/Makefile directly (this is static way)
Note: after cvsup'ing your ports tree, this Makefile will be edited back to the original.
2) You can add make option just like running the configure script when you compile Apache from src (many *BSD users don't know this)
i.e.
#/usr/ports/www/apache13
# make prefix=/usr/local without-confadjust enable-module=most enable-shared=max
# make install
(this is dynamic way)

The dynamic way is as flexible as running configure script.

>> so that the other administrators on this system would not have to update the MANPATH

/usr/local/man is a standard MANPATH, therefore, nobody ever needs to add MANPATH manually.

>> I actually resolved this problem by wiping the system in question

Glad to hear that. BTW, if you have any questions regarding to *BSD (not just FreeBSD), come over to http://bsdvault.net, I am there all the time.

Thanks for the tips. I appreciate you taking time to look at my problem. I have mod_auth_mysql up and running fine now. Sorry I didn't respond sooner I just moved across the country. Thanks again.










privacy (GDPR)