public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: mod_auth_mysql (2nd request)
       [not found] <3F447A83.95F6EE91@wapme-systems.de>
@ 2003-08-21 11:24 ` Bill McCormick
  0 siblings, 0 replies; 2+ messages in thread
From: Bill McCormick @ 2003-08-21 11:24 UTC (permalink / raw)
  To: Cygwin

Thanks Stipe:

[snip]
> >
> > Auth_MySQL_Info host user password
> > Auth_MySQL_Encryption_Types Plaintext, Crypt_DES, MySQL
> >
> > <Directory /var/www/htdocs/*/admin>
> >     AuthType Basic
> >     AuthName "Password Required"
> >     Auth_MySQL_DB *
> >     Auth_MySQL_Password_Table http_auth
> >     Auth_MySQL_Group_Table http_auth
> >     Auth_MySQL_Empty_Passwords  Off
> >     Require Group admins
> > </Directory>
>
> I didn't get the point what you want to do here?!


I would like to be able to use the [Auth_MySQL_DB *] directive in httpd.conf
to avoid having a .htaccess in each of my users admin directory. (see
example directive above)

> now, I guess you are building apache statically, right? In that case
> you will have to provide the libmysqlclient.a and libz.a as LDFLAGS to
> the build process.
>
> Another option is to rebuild apache in shared dynamic mode, which will
> create .dll files for each module (even the core).
>

I expected shared dynamic mode. This is how it comes with the cygwin disto,
right? So I followed the cygwin/apache docs:


I used the recommended configure from the cygwin/apache docs ...

$ ./configure \
--with-layout=Cygwin \
--with-port=80 \
--enable-rule=EAPI\
--enable-module=most\
--enable-shared=max\
--activate-module=src/modules/auth_mysql/libauth_mysql.a\
--with-perl=/bin/perl.exe\
--disable-module=src/modules/standard/mod_auth_dbm

... and added the last three parameters.

Which produced:
-----------------------
##
##  Inherited Makefile options from Configure script
##  (Begin of automatically generated section)
##
SRCDIR=.
EXTRA_CFLAGS=`$(SRCDIR)/apaci`
EXTRA_LDFLAGS=
EXTRA_LIBS=
EXTRA_INCLUDES=
EXTRA_DEPS=
OSDIR=$(SRCDIR)/os/cygwin
INCDIR=$(SRCDIR)/include
INCLUDES0=-I$(OSDIR) -I$(INCDIR)
SHELL=/bin/sh
OS=Cygwin
CC=gcc
CPP=gcc -E
TARGET=httpd
OPTIM=
CFLAGS1=-I/usr/local/mysql/include/mysql  -DCYGWIN -DUSE_HSREGEX -DNO_DL_NEE
DED
INCLUDES1=
LIBS_SHLIB=
LDFLAGS1=
MFLAGS_STATIC=--no-print-directory
REGLIB=regex/libregex.a
EXPATLIB=
RANLIB=ranlib
LIBS1= -L/usr/local/mysql/lib/mysql -L/lib -lz -lmysqlclient -lcrypt -lgdbm 
-lexpat
-----------------------------------

I then made minor changes to LIBS1 section. At the time I wasn't aware that
the libs need to be in LDFLAGS for dynamic build. So did I leave something
out during configure? For dynamic build, should the lib flags be in LDFLAGS1
or EXTRA_LDFLAGS, or it doesn't matter?

> Then you can tweak /usr/local/apache/bin/apxs as it is in the cygwin
> net distribution (this can't be done automatically from the apache
> build process for cygwin unfortunately).
>
> After you 'make' and 'make install' simply copy the apxs from the
> orginal distribution tree into your build install tree and then use
> apxs to compile the mysql_auth module like
>
>   $ ./apxc -c mod_auth_mysql.c
>
> in case you need to add LDFLAGS you can pass apxs the -L and -l
> options for the gcc.
>
> Hope I gave you a good roadmap.

Yes, very helpful, thank you :)

>
> BTW, why is the recompiling of mysql_auth necessary?
>

No it's not. However, in the latest ver (2.20), Zeev has changed the apache
directives. He's kindly providing a script to update .htaccess files but I'd
rather avoid that whole mess and go with all the latest as I just now begin
to add password security to my application. Furthermore, in 2.20 there have
been a number of fixes relating to crypt'ing that I'd like to get out of the
way.

Is the versioning the same between the cygwin distro and disto from Zeev?
i.e. does cygwin mod_auth_myslq 1.11-1 == mod_auth_myslq 1.11-1. I didn't
find a 1.11-1 in Zeev's rev history?


Thanks,

Bill
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: mod_auth_mysql (2nd request)
  2003-08-18 23:51 mod_auth_mysql Bill McCormick
@ 2003-08-19 15:57 ` Bill McCormick
  0 siblings, 0 replies; 2+ messages in thread
From: Bill McCormick @ 2003-08-19 15:57 UTC (permalink / raw)
  To: Cygwin

So I went ahead and tried to rebuild Apache (the build on mod_auth_mysql)
said that I needed to. I'm stuck here:

modules/auth_mysql/libauth_mysql.a(mod_auth_mysql.o.b)(.text+0xc4b):mod_auth
_mysql.c: undefined reference to `_mysql_connect'
/usr/local/mysql/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0x8b):my_co
mpress.c: undefined reference to `_compress'
/usr/local/mysql/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0x16d):my_c
ompress.c: undefined reference to `_compress'
/usr/local/mysql/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0x210):my_c
ompress.c: undefined reference to `_uncompress'
collect2: ld returned 1 exit status
make: *** [target_static] Error 1

By the way, I'm running a Win32 MySQL server (on the same box) and trying to
link against the standard unix mysql binaries.

Ideas?

Thanks,


Bill



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-21 10:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3F447A83.95F6EE91@wapme-systems.de>
2003-08-21 11:24 ` mod_auth_mysql (2nd request) Bill McCormick
2003-08-18 23:51 mod_auth_mysql Bill McCormick
2003-08-19 15:57 ` mod_auth_mysql (2nd request) Bill McCormick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).