You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Rob Sterenborg <ro...@sterenborg.info> on 2006/09/14 18:23:20 UTC
[users@httpd] Error 500 with DBD-MySQL auth
Hi all,
I have installed httpd-2.2.3, apr-1.2.7 and apr-util-1.2.7 with MySQL
support (using MySQL-5.0.24a).
When I start the server authentication works well.
After some time (don't know much) when I try to logon I get error 500. When I
restart Apache, authentication is working again.
Below is an error log from start to end (including apachectl restart and
succeeding at last) with LogLevel set to debug. The access log doesn't have
any useful information except one line reporting error 500.
As can be read in thread "Apache 2.2.3 and MySQL 5.0.24a", I have recompiled
all of this a number of times, each time with the same problem.
Anybody know why after some time DBD cannot lookup the username anymore?
Regards,
Rob
====================
Error log:
[Thu Sep 14 15:31:05 2006] [debug] mod_deflate.c(447): [client
<client_ip>] Zlib: Compressed 566 to 380 : URL /windl
[Thu Sep 14 15:31:07 2006] [error] [client 193.173.147.3] Error looking up
<username> in database
[Thu Sep 14 15:31:07 2006] [debug] mod_deflate.c(447): [client
<client_ip>] Zlib: Compressed 711 to 425 : URL /windl
(restarted Apache here..)
[Thu Sep 14 15:31:34 2006] [debug] mod_deflate.c(447): [client
<client_ip>] Zlib: Compressed 406 to 277 : URL /windl
[Thu Sep 14 15:31:35 2006] [debug] mod_deflate.c(447): [client
<client_ip>] Zlib: Compressed 5183 to 1188 : URL /windl/
====================
Relevant httpd.conf sections:
DBDriver mysql
DBDParams "host=<db_host> dbname=<db_name> user=<db_user> pass=<db_pass>"
DBDMin 1
DBDKeep 2
DBDMax 10
DBDExptime 60
<VirtualHost *:80>
ServerAdmin postmaster@sterenborg.info
DocumentRoot /path/to/website
ServerName www.sterenborg.info
ErrorLog /path/to/e_www
CustomLog /path/to/a_www combined
LogLevel debug
</VirtualHost>
<Directory /path/to/windl>
DirectoryIndex index.php
AuthName "Please enter your logon details..."
AuthType Basic
AuthBasicProvider dbd
AuthDBDUserPWQuery "select <pwd_field> from users where <usr_field>=%s"
AuthzDBDQuery "SELECT <grp_field> FROM users WHERE <usr_field>=%s"
Require dbd-group admins download
Options Indexes
IndexOptions FancyIndexing FoldersFirst NameWidth=60
</Directory>
---------------------------------------------------------------------
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] Error 500 with DBD-MySQL auth
Posted by Nick Kew <ni...@webthing.com>.
On Thursday 14 September 2006 17:23, Rob Sterenborg wrote:
> Hi all,
>
> I have installed httpd-2.2.3, apr-1.2.7 and apr-util-1.2.7 with MySQL
> support (using MySQL-5.0.24a).
>
> When I start the server authentication works well.
>
> After some time (don't know much) when I try to logon I get error 500. When
> I restart Apache, authentication is working again.
>
> Below is an error log from start to end (including apachectl restart and
> succeeding at last) with LogLevel set to debug. The access log doesn't have
> any useful information except one line reporting error 500.
Look in the error log!
> As can be read in thread "Apache 2.2.3 and MySQL 5.0.24a", I have
> recompiled all of this a number of times, each time with the same problem.
>
> Anybody know why after some time DBD cannot lookup the username anymore?
I haven't used it with mysql 5 myself, only 4.1. But I'm told mysql_ping
is different, in that if a connection has timed out, mysql_ping (which
the DBD driver uses) will reconnect automatically in 4.1 but not in 5.0.
Could it be timing out? If so, check the MySQL docs to see what the idle
timeout is and how to change it. You can then tweak your DBD settings.
--
Nick Kew
Application Development with Apache - the Apache Modules Book
http://www.prenhallprofessional.com/title/0132409674
---------------------------------------------------------------------
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