List:General Discussion« Previous MessageNext Message »
From:Richard S. Blake Date:November 1 2002 6:07pm
Subject:help? w/ mySQL Authentication in Apache2: mod_auth_mysql vs.
Apache2 on OSX 10.2.1
View as plain text  
hi all,

i'm trying to get mod_auth_mysql up/running on my OSX 10.2.1 box

to date, i've successuflly gotten Apache2, PHP, Perl, & MySQL humming along
together.  Here's the env:

my current apache server-info reports as:
           Apache/2.0.44-dev (Unix) mod_perl/1.99_07-dev Perl/v5.8.0
mod_webapp/1.2.0-dev mod_fastcgi/mod_fastcgi-SNAP-0210222112 PHP/4.3.0-dev

and mysqladmin version reports:
           mysqladmin  Ver 8.37 Distrib 4.0.4-beta, for apple-darwin6.1 on

Next step for me is User Authentication in Apache2 via a "central" MySQL
DB.  I.e. -- mod_auth_mysql

After having fumbled & failed with Zeef Suraski's mod_auth_mysql-2.20, i
discovered Vivek Khera's apache2-friendly build on sourceforge

a "normal" (per instrtuctions) apxs build of it got me nowhere ..... no
".so" was ever built, just a ".la", but combining info from a couple of the
sparse posts on the matter got me a lot further!

to build, the following seems to work .....

> cd /usr/ports/mod_auth_mysql

> setenv CFLAGS "-no-cpp-precomp"

> apxs -DAPACHE2 -L/usr/local/mysql4/lib/mysql
-I/usr/local/mysql4/include/mysql -lmysqlclient -lm -Wc,-g -c

-I/usr/include/apache2 -g -L/usr/local/mysql4/lib/mysql
-I/usr/local/mysql4/include/mysql -c mod_auth_mysql.c

> cc -bundle -flat_namespace undefined suppress -o

> cp /usr/ports/mod_auth_mysql/ /usr/libexec/apache2/

> apxs -i -a

this creates:
-rwxr-xr-x    1 root     wheel       41712 Oct 31 12:53

& adds to httpd.conf:
LoadModule mysql_auth_module libexec/apache2/     (hmmmmm
.... strange!)

so a quick fix in httpd.conf .......

(EDITOR) /etc/apache2/httpd.conf
---     LoadModule mysql_auth_module libexec/apache2/
+++   LoadModule auth_mysql_module libexec/apache2/

unfortunately, upon access to a test directory "(webroot)/testing", with

i get an Internal Server Error 500

a peek into my  /var/log/apache2/error_log shows:

[Thu Oct 31 13:12:29 2002] [alert] [client]
/Library/WebServer/Documents/testing/.htaccess: Invalid command
'AuthMySQLHost', perhaps mis-spelled or defined by a module not included in
the server configuration

where my (webroot)/testing/.htaccess is:

    AuthName "MySQL Testing"
    AuthType Basic
    AuthGroupFile /dev/null

<Limit GET>
    AuthMySQLHost localhost
    AuthMySQLDB http_user_auth

    AuthMySQLUserTable user_info
    AuthMySQLGroupTable user_group

    AuthMySQLNameField user_name
    AuthMySQLPasswordField user_passwd
    AuthMySQLGroupField user_group

    require valid-user

# *  AuthMySQLUser <no default -- NULL>
# *  AuthMySQLPassword <no default -- NULL>

    AuthMySQLNoPasswd On
    AuthMySQLCryptedPasswords On
    AuthMySQLScrambledPasswords Off

    AuthMySQLKeepAlive Off
    AuthMySQLAuthoritative On

# *  AuthMySQLUserCondition <no default>
# *  AuthMySQLGroupCondition <no default>

any thoughts/insights/pointers as to what the problem/fix is would be much



help? w/ mySQL Authentication in Apache2: mod_auth_mysql vs.Apache2 on OSX 10.2.1Richard S. Blake1 Nov