You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Fred McCann <fr...@automaticrootbeer.com> on 2006/02/26 20:09:11 UTC

[users@httpd] Configuring mod_authn_dbd with apr_dbd_mysql on Apache 2.2

I'm trying to configure mod_authn_dbd to use a mysql database. I'm  
running MySQL 5.0.18 and Apache 2.2 on FreeBSD 6.0-RELEASE.


Here's what I have for configuration:

# Database Management
DBDriver mysql

#Connection string: database name and login credentials
DBDParams "dbname=UserDirectory user=readonly password=moo"

#Parameters for Connection Pool Management
DBDMin  1
DBDKeep 2
DBDMax  10
DBDExptime 60

NameVirtualHost 192.168.1.7

<VirtualHost 192.168.1.7:*>
         ServerAdmin admin@example.com
         DocumentRoot /usr/local/www/apache22/data
         ServerName intranet.example.com
         ErrorLog logs/intranet.example.com-error_log

         <Directory /usr/local/www/apache22/data>
                 AuthType Basic
                 AuthName "Intranet"
                 AuthBasicProvider dbd
                 Require valid-user
                 AuthDBDUserPWQuery "select password from  
user_permissions where username = %s"
         </Directory>
</VirtualHost>


When I try to start apache, I'm getting a segfault:

fry# /usr/local/etc/rc.d/apache22.sh onerestart
Performing sanity check on apache22 configuration:
Segmentation fault (core dumped)

I've tried removing each config option one at a time, and the  
offending directive is AuthDBDUserPWQuery. Is there something I'm  
doing wrong here? I've verified that the server is running, the  
username+password is correct, and the query is valid.

Is there anything I got wrong here? Is apr_dbd_mysql incompatible  
with my version of MySQL, FreeBSD, or Apache?

- Fred

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Configuring mod_authn_dbd with apr_dbd_mysql on Apache 2.2

Posted by Fred McCann <fr...@automaticrootbeer.com>.
Nick Kew wrote:
 > On Sunday 26 February 2006 19:09, Fred McCann wrote:
 >
 >> Is there anything I got wrong here? Is apr_dbd_mysql incompatible
 >> with my version of MySQL, FreeBSD, or Apache?
 >
 > That's a difficult one.  Are you using apr_dbd_mysql from up-to- 
date source
 > and compiled with all the same options as (the rest of) your APR- 
util?
 >

I'm fairly certain that that I'm compiling with the same options, but  
I'm not sure if the FreeBSD ports distfile has the most up-to-date  
version of the source. I took a look at the source file and I  
couldn't see anything that looks like a version number.

Is the answer here not to use apr_dbd_mysql? I suppose I could roll  
back to an older version of apache and try a 3rd party plugin or  
perhaps try postgres.


- Fred



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Configuring mod_authn_dbd with apr_dbd_mysql on Apache 2.2

Posted by Nick Kew <ni...@webthing.com>.
On Sunday 26 February 2006 19:09, Fred McCann wrote:

> Is there anything I got wrong here? Is apr_dbd_mysql incompatible
> with my version of MySQL, FreeBSD, or Apache?

That's a difficult one.  Are you using apr_dbd_mysql from up-to-date source
and compiled with all the same options as (the rest of) your APR-util?

I think the mysql driver needs a prominent notice about its status.
Basically it's not adequately maintained, and can't be until we have
maintainers running it on different platforms.  I've only run it against
MySQL 4.1.x, and even that was some time ago (I use PostgreSQL
in my live server).  I'm also less inclined to maintain it than I was a
year ago, after approaching MySQL AB about the licensing issue, and
finding myself on a MySQL spam list for my pains.

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org