You are not logged in.

#1 2006-07-05 06:15:34

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

mod_auth_mysql

Hello,

I need mod_auth_mysql for my server. This apache-module is able to use a mysql-db for user-auth.

I created a PKGBUILD, but I got compile-errors. Perhaps someone is able to build this.

pkgname=mod_auth_mysql
pkgver=3.0.0
pkgrel=1
pkgdesc="mod_auth_mysql is an Apache module to authenticate users and authorize access
through a MySQL database."
url="http://modauthmysql.sourceforge.net/"
source=(http://dl.sourceforge.net/sourceforge/modauthmysql/$pkgname-$pkgver.tar.gz)
md5sums=('a9ffde3dabeddf32de50bf75597c809e')

build() {
  cd $startdir/src/$pkgname-$pkgver
  apxs -c -lmysqlclient -lm -lz mod_auth_mysql.c
  apxs -i mod_auth_mysql.la
}

Offline

#2 2006-07-05 20:59:07

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: mod_auth_mysql

Post the errors that you are getting.

-Moved to "Making Packages"

Offline

#3 2006-07-06 08:21:21

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: mod_auth_mysql

I have found a patch by redhat. Now I can compile with following PKGBUILD:

pkgname=mod_auth_mysql
pkgver=3.0.0
pkgrel=1
pkgdesc="mod_auth_mysql is an Apache module to authenticate users and authorize access through a MySQL database."
url="http://modauthmysql.sourceforge.net/" 
source=(mod_auth_mysql-3.0.0-apr1x.patch http://dl.sourceforge.net/sourceforge/modauthmysql/$pkgname-$pkgver.tar.gz)
#md5sums=('a9ffde3dabeddf32de50bf75597c809e')

build() {
    cd $startdir/src/$pkgname-$pkgver
    patch -Np1 -i ../mod_auth_mysql-3.0.0-apr1x.patch
    apxs -I/usr/include/mysql -Wc,-Wall -Wc,-Werror -c mod_auth_mysql.c -L/usr/lib/mysql -lmysqlclient
    ld -Bshareable -o mod_auth_mysql.so mod_auth_mysql.o

    mkdir -p $startdir/pkg/usr/lib/apache/
    install -m644 mod_auth_mysql.so $startdir/pkg/usr/lib/apache/mod_auth_mysql.so
}

But when I start Apache I got:

httpd: Syntax error on line 113 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_auth_mysql.so into server: /etc/httpd/modules/mod_auth_mysql.so: undefined symbol: mysql_store_result

Offline

#4 2006-07-06 20:10:39

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: mod_auth_mysql

You need to link against the library that has this symbol defined. I'm not familiar with the ld command but try adding /usr/lib/mysql/libmysqlclient.a at the end of the ld line.
If it doesn't work, look at ld man pages. You need to tell ld to also use  libmysqlclient when it creates mod_auth_mysql.so

Offline

#5 2006-07-07 15:47:19

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: mod_auth_mysql

OK, I put it into AUR: http://aur.archlinux.org/packages.php?d … =1&ID=5887

It is now compiling and can be loaded by Apache. But if I want to access a such protected area I got:

[Fri Jul 07 17:35:33 2006] [error] Internal error: pcfg_openfile() called with NULL filename
[Fri Jul 07 17:35:33 2006] [error] [client 80.136.156.220] (9)Bad file descriptor: Could not open password file: (null)

For me this seems to be very useless; of course we have no passwd-file at all. Any ideas?

Offline

#6 2006-07-07 16:45:51

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: mod_auth_mysql

For that, read the docs or try googling. Maybe you need to create that file... I have no experience with apache/mysql so I can't suggest anything better.

Offline

#7 2006-07-07 16:57:26

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: mod_auth_mysql

OK, I think I`ll give up. mod_auth_mysql is not maintained any more. One should use the build-in auth_dbd module from apache2.2

I need to patch and recompile apr-util for this. (Arch has db-support disabled by default)

Offline

Board footer

Powered by FluxBB