mod_dbd & mod_dbd_authn - mysql user authentication problems - apache2.2.9

mod_dbd & mod_dbd_authn - mysql user authentication problems - apache2.2.9

am 07.08.2008 21:53:14 von Steve Whitson

I’m trying to use mod_dbd and mod_authn_dbd and replacements for
mod_auth_mysql within an apache 2.2.9 server I built on solaris.

I configure up the database info as such:

DBDriver mysql
DBDParams "host=somehostname dbname=somedatabasename user=someuser
pass=somepass"
DBDMin 4
DBDKeep 8
DBDMax 20
DBDExptime 300

I have the typical root directory configuration for the htdocs folder:

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all

AuthType Basic
AuthName "Website Mysql Userdb Verification"
AuthBasicProvider dbd

AuthDBDUserPWQuery "select password from users where name = %s"

....
When I start the server I get the following error:

[notice] Apache/2.2.9 (Unix) DAV/2 PHP/5.2.6 SVN/1.5.1 configured --
resuming normal operations
[info] Server built: Aug 7 2008 11:06:05
[debug] prefork.c(1001): AcceptMutex: fcntl (default: fcntl)
[error] (20014)Internal error: DBD: failed to prepare SQL statements:
Unknown command
[error] (20014)Internal error: DBD: failed to initialise

If I comment out the AuthDBDUserPWQuery entry, the DBD errors don’t occur.

I also tried the entry
DBDPrepareSQL "select password from users where name = %s" prepQuery

I was thinking I could use the prepared query with AuthDBUserPWQuery.
But, when only the DBDPrepareSQL is present (and not AuthDBuserPWQuery)
apache still gives the same errors.

Ideas? Is there something I’m dong wrong here?

Thanks much,

-Steve

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: mod_dbd & mod_dbd_authn - mysql user authentication problems - apache 2.2.9

am 08.08.2008 01:29:39 von Danie Qian

----- Original Message -----
From: "Steve Whitson"
To:
Sent: Thursday, August 07, 2008 3:53 PM
Subject: [users@httpd] mod_dbd & mod_dbd_authn - mysql user authentication
problems - apache 2.2.9


> I’m trying to use mod_dbd and mod_authn_dbd and replacements for
> mod_auth_mysql within an apache 2.2.9 server I built on solaris.
>
> I configure up the database info as such:
>
> DBDriver mysql
> DBDParams "host=somehostname dbname=somedatabasename user=someuser
> pass=somepass"
> DBDMin 4
> DBDKeep 8
> DBDMax 20
> DBDExptime 300
>
> I have the typical root directory configuration for the htdocs folder:
>
> Options Indexes FollowSymLinks MultiViews
> AllowOverride All
> Order allow,deny
> Allow from all
>
> AuthType Basic
> AuthName "Website Mysql Userdb Verification"
> AuthBasicProvider dbd
>
> AuthDBDUserPWQuery "select password from users where name = %s"
>
> ...
> When I start the server I get the following error:
>
> [notice] Apache/2.2.9 (Unix) DAV/2 PHP/5.2.6 SVN/1.5.1 configured --
> resuming normal operations
> [info] Server built: Aug 7 2008 11:06:05
> [debug] prefork.c(1001): AcceptMutex: fcntl (default: fcntl)
> [error] (20014)Internal error: DBD: failed to prepare SQL statements:
> Unknown command
> [error] (20014)Internal error: DBD: failed to initialise
>
> If I comment out the AuthDBDUserPWQuery entry, the DBD errors don’t occur.
>
> I also tried the entry
> DBDPrepareSQL "select password from users where name = %s" prepQuery
>
> I was thinking I could use the prepared query with AuthDBUserPWQuery. But,
> when only the DBDPrepareSQL is present (and not AuthDBuserPWQuery) apache
> still gives the same errors.
>
> Ideas? Is there something I’m dong wrong here?
>
> Thanks much,
>
> -Steve
>

I have been using mod_dbd for authentication fine for over a year. You
syntax looks the same as mine so I guess you might be missing some modules.
the whole setup is a bunch of modules/libraries stacked together


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: mod_dbd & mod_dbd_authn - mysql user authenticationproblems - apache 2.2.9

am 08.08.2008 02:20:51 von Tom Donovan

Steve Whitson wrote:
> I’m trying to use mod_dbd and mod_authn_dbd and replacements for
> mod_auth_mysql within an apache 2.2.9 server I built on solaris.

> AuthDBDUserPWQuery "select password from users where name = %s"
> ...
> When I start the server I get the following error:

> [error] (20014)Internal error: DBD: failed to prepare SQL statements:
> Unknown command
> [error] (20014)Internal error: DBD: failed to initialise

A guess: mysql table names are case-sensitive on Unix, although field names are not.

Is your actual table name "Users" rather than "users" ?

-tom-


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: mod_dbd & mod_dbd_authn - mysql user authenticationproblems - apache 2.2.9

am 08.08.2008 02:53:02 von unknown

Post removed (X-No-Archive: yes)

Re: mod_dbd & mod_dbd_authn - mysql user authenticationproblems - apache 2.2.9

am 08.08.2008 20:21:39 von Steve Whitson

--Boundary_(ID_pMgr8lHpfsXp0W2/7K6Hkw)
Content-type: text/plain; charset=windows-1252; format=flowed
Content-transfer-encoding: 8BIT

Thanks the help! I won't be back to work until Monday to try this....

Res wrote:
> On Thu, 7 Aug 2008, Tom Donovan wrote:
>
>> Steve Whitson wrote:
>>> I’m trying to use mod_dbd and mod_authn_dbd and replacements for
>>> mod_auth_mysql within an apache 2.2.9 server I built on solaris.
>>
>>> AuthDBDUserPWQuery "select password from users where name = %s"
>>> ...
>>> When I start the server I get the following error:
>>
>>> [error] (20014)Internal error: DBD: failed to prepare SQL
>>> statements: Unknown command
>>> [error] (20014)Internal error: DBD: failed to initialise
>>
>> A guess: mysql table names are case-sensitive on Unix, although field
>> names are not.
>>
>> Is your actual table name "Users" rather than "users" ?
>
> That wont produce errors like that, not in apache log on "start up"
>
>
> Steve:
> Try this: httpd -t -D DUMP_MODULES
>
> and look for 'authn_dbd_module' and 'dbd_module'
> and ensure it reprots no problems with syntax
>
>
> ------------------------------------------------------------ ------------
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See 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


--Boundary_(ID_pMgr8lHpfsXp0W2/7K6Hkw)
Content-type: text/html; charset=windows-1252
Content-transfer-encoding: 8BIT




http-equiv="Content-Type">


Thanks the help!  I won't be back to work until Monday to try this....



Res wrote:
cite="mid:Pine.LNX.4.64.0808081044300.1518@ebfjryy.nhfvpf.ar g"
type="cite">On Thu, 7 Aug 2008, Tom Donovan wrote:




Steve Whitson wrote:


I’m trying to use mod_dbd and mod_authn_dbd
and replacements for mod_auth_mysql within an apache 2.2.9 server I
built on solaris.





AuthDBDUserPWQuery "select password from
users where name = %s"


....


When I start the server I get the following error:





[error] (20014)Internal error: DBD: failed
to prepare SQL statements: Unknown command


[error] (20014)Internal error: DBD: failed to initialise





A guess: mysql table names are case-sensitive on Unix, although field
names are not.




Is your actual table name "Users" rather than "users" ?





That wont produce errors like that, not in apache log on "start up"






Steve:


Try this:   httpd -t -D DUMP_MODULES




and look for 'authn_dbd_module' and  'dbd_module'


and ensure it reprots no problems with syntax









------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail:
" from the digest:
For additional commands, e-mail:







--Boundary_(ID_pMgr8lHpfsXp0W2/7K6Hkw)--

Re: mod_dbd & mod_dbd_authn - mysql user authenticationproblems - apache 2.2.9

am 08.08.2008 20:22:52 von Steve Whitson

The query works just fine from the command line interface (from the same
server system), and matches the case of the tables (all lower case).

Thanks much!

Tom Donovan wrote:
> Steve Whitson wrote:
>> I’m trying to use mod_dbd and mod_authn_dbd and replacements for
>> mod_auth_mysql within an apache 2.2.9 server I built on solaris.
>
>> AuthDBDUserPWQuery "select password from users where name = %s"
>> ...
>> When I start the server I get the following error:
>
>> [error] (20014)Internal error: DBD: failed to prepare SQL statements:
>> Unknown command
>> [error] (20014)Internal error: DBD: failed to initialise
>
> A guess: mysql table names are case-sensitive on Unix, although field
> names are not.
>
> Is your actual table name "Users" rather than "users" ?
>
> -tom-
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See 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
>



------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: mod_dbd & mod_dbd_authn - mysql user authenticationproblems - apache 2.2.9

am 08.08.2008 20:23:46 von Steve Whitson

Thanks for sharing that things are working for you! I'll try enabling
more (or all built) modules since I built most of them.

Danie Qian wrote:
>
> ----- Original Message ----- From: "Steve Whitson"
>
> To:
> Sent: Thursday, August 07, 2008 3:53 PM
> Subject: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
> authentication problems - apache 2.2.9
>
>
>> I’m trying to use mod_dbd and mod_authn_dbd and replacements for
>> mod_auth_mysql within an apache 2.2.9 server I built on solaris.
>>
>> I configure up the database info as such:
>>
>> DBDriver mysql
>> DBDParams "host=somehostname dbname=somedatabasename user=someuser
>> pass=somepass"
>> DBDMin 4
>> DBDKeep 8
>> DBDMax 20
>> DBDExptime 300
>>
>> I have the typical root directory configuration for the htdocs folder:
>>
>> Options Indexes FollowSymLinks MultiViews
>> AllowOverride All
>> Order allow,deny
>> Allow from all
>>
>> AuthType Basic
>> AuthName "Website Mysql Userdb Verification"
>> AuthBasicProvider dbd
>>
>> AuthDBDUserPWQuery "select password from users where name = %s"
>>
>> ...
>> When I start the server I get the following error:
>>
>> [notice] Apache/2.2.9 (Unix) DAV/2 PHP/5.2.6 SVN/1.5.1 configured --
>> resuming normal operations
>> [info] Server built: Aug 7 2008 11:06:05
>> [debug] prefork.c(1001): AcceptMutex: fcntl (default: fcntl)
>> [error] (20014)Internal error: DBD: failed to prepare SQL statements:
>> Unknown command
>> [error] (20014)Internal error: DBD: failed to initialise
>>
>> If I comment out the AuthDBDUserPWQuery entry, the DBD errors don’t
>> occur.
>>
>> I also tried the entry
>> DBDPrepareSQL "select password from users where name = %s" prepQuery
>>
>> I was thinking I could use the prepared query with AuthDBUserPWQuery.
>> But, when only the DBDPrepareSQL is present (and not
>> AuthDBuserPWQuery) apache still gives the same errors.
>>
>> Ideas? Is there something I’m dong wrong here?
>>
>> Thanks much,
>>
>> -Steve
>>
>
> I have been using mod_dbd for authentication fine for over a year. You
> syntax looks the same as mine so I guess you might be missing some
> modules. the whole setup is a bunch of modules/libraries stacked together
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See 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
>



------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: mod_dbd & mod_dbd_authn - mysql user authenticationproblems - apache 2.2.9

am 11.08.2008 15:21:39 von Steve Whitson

--------------000007060607050605040409
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit

Res:

I've listed the modules (-t -D DUMP_MODULES), and both dbd_module &
authn_dbd_module show up in the list. The last line in the report
states 'Syntax OK'.

Thanks,
-Steve

Res wrote:
> On Thu, 7 Aug 2008, Tom Donovan wrote:
>
>> Steve Whitson wrote:
>>> I’m trying to use mod_dbd and mod_authn_dbd and replacements for
>>> mod_auth_mysql within an apache 2.2.9 server I built on solaris.
>>
>>> AuthDBDUserPWQuery "select password from users where name = %s"
>>> ...
>>> When I start the server I get the following error:
>>
>>> [error] (20014)Internal error: DBD: failed to prepare SQL
>>> statements: Unknown command
>>> [error] (20014)Internal error: DBD: failed to initialise
>>
>> A guess: mysql table names are case-sensitive on Unix, although field
>> names are not.
>>
>> Is your actual table name "Users" rather than "users" ?
>
> That wont produce errors like that, not in apache log on "start up"
>
>
> Steve:
> Try this: httpd -t -D DUMP_MODULES
>
> and look for 'authn_dbd_module' and 'dbd_module'
> and ensure it reprots no problems with syntax
>
>
> ------------------------------------------------------------ ------------
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See 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


--------------000007060607050605040409
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: 8bit




http-equiv="Content-Type">



Res:



I've listed the modules (-t -D DUMP_MODULES), and both dbd_module &
authn_dbd_module show up in the list.  The last line in the report
states 'Syntax OK'.



Thanks,

    -Steve



Res wrote:
cite="mid:Pine.LNX.4.64.0808081044300.1518@ebfjryy.nhfvpf.ar g"
type="cite">On Thu, 7 Aug 2008, Tom Donovan wrote:




Steve Whitson wrote:


I’m trying to use mod_dbd and mod_authn_dbd
and replacements for mod_auth_mysql within an apache 2.2.9 server I
built on solaris.





AuthDBDUserPWQuery "select password from
users where name = %s"


....


When I start the server I get the following error:





[error] (20014)Internal error: DBD: failed
to prepare SQL statements: Unknown command


[error] (20014)Internal error: DBD: failed to initialise





A guess: mysql table names are case-sensitive on Unix, although field
names are not.




Is your actual table name "Users" rather than "users" ?





That wont produce errors like that, not in apache log on "start up"






Steve:


Try this:   httpd -t -D DUMP_MODULES




and look for 'authn_dbd_module' and  'dbd_module'


and ensure it reprots no problems with syntax









------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail:
" from the digest:
For additional commands, e-mail:







--------------000007060607050605040409--

Re: mod_dbd & mod_dbd_authn - mysql user authenticationproblems - apache 2.2.9

am 11.08.2008 15:24:58 von Steve Whitson

I've loaded all modules built when using -enable-mods-shared=most and
still no luck (same error). Here's the list:

../httpd -t -D DUMP_MODULES
Loaded Modules:
core_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
authn_file_module (shared)
authn_dbm_module (shared)
authn_anon_module (shared)
authn_dbd_module (shared)
authn_default_module (shared)
authz_host_module (shared)
authz_groupfile_module (shared)
authz_user_module (shared)
authz_dbm_module (shared)
authz_owner_module (shared)
authz_default_module (shared)
auth_basic_module (shared)
auth_digest_module (shared)
dbd_module (shared)
dumpio_module (shared)
ext_filter_module (shared)
include_module (shared)
filter_module (shared)
substitute_module (shared)
deflate_module (shared)
log_config_module (shared)
logio_module (shared)
env_module (shared)
expires_module (shared)
headers_module (shared)
ident_module (shared)
setenvif_module (shared)
mime_module (shared)
dav_module (shared)
status_module (shared)
autoindex_module (shared)
asis_module (shared)
info_module (shared)
cgi_module (shared)
dav_fs_module (shared)
vhost_alias_module (shared)
negotiation_module (shared)
dir_module (shared)
imagemap_module (shared)
actions_module (shared)
speling_module (shared)
userdir_module (shared)
alias_module (shared)
rewrite_module (shared)
php5_module (shared)
Syntax OK


Danie Qian wrote:
>
> ----- Original Message ----- From: "Steve Whitson"
>
> To:
> Sent: Thursday, August 07, 2008 3:53 PM
> Subject: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
> authentication problems - apache 2.2.9
>
>
>> I’m trying to use mod_dbd and mod_authn_dbd and replacements for
>> mod_auth_mysql within an apache 2.2.9 server I built on solaris.
>>
>> I configure up the database info as such:
>>
>> DBDriver mysql
>> DBDParams "host=somehostname dbname=somedatabasename user=someuser
>> pass=somepass"
>> DBDMin 4
>> DBDKeep 8
>> DBDMax 20
>> DBDExptime 300
>>
>> I have the typical root directory configuration for the htdocs folder:
>>
>> Options Indexes FollowSymLinks MultiViews
>> AllowOverride All
>> Order allow,deny
>> Allow from all
>>
>> AuthType Basic
>> AuthName "Website Mysql Userdb Verification"
>> AuthBasicProvider dbd
>>
>> AuthDBDUserPWQuery "select password from users where name = %s"
>>
>> ...
>> When I start the server I get the following error:
>>
>> [notice] Apache/2.2.9 (Unix) DAV/2 PHP/5.2.6 SVN/1.5.1 configured --
>> resuming normal operations
>> [info] Server built: Aug 7 2008 11:06:05
>> [debug] prefork.c(1001): AcceptMutex: fcntl (default: fcntl)
>> [error] (20014)Internal error: DBD: failed to prepare SQL statements:
>> Unknown command
>> [error] (20014)Internal error: DBD: failed to initialise
>>
>> If I comment out the AuthDBDUserPWQuery entry, the DBD errors don’t
>> occur.
>>
>> I also tried the entry
>> DBDPrepareSQL "select password from users where name = %s" prepQuery
>>
>> I was thinking I could use the prepared query with AuthDBUserPWQuery.
>> But, when only the DBDPrepareSQL is present (and not
>> AuthDBuserPWQuery) apache still gives the same errors.
>>
>> Ideas? Is there something I’m dong wrong here?
>>
>> Thanks much,
>>
>> -Steve
>>
>
> I have been using mod_dbd for authentication fine for over a year. You
> syntax looks the same as mine so I guess you might be missing some
> modules. the whole setup is a bunch of modules/libraries stacked together
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See 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
>


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: mod_dbd & mod_dbd_authn - mysql user authentication problems - apache 2.2.9

am 11.08.2008 16:34:54 von Danie Qian

----- Original Message -----
From: "Steve Whitson"
To:
Sent: Monday, August 11, 2008 9:24 AM
Subject: Re: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
authentication problems - apache 2.2.9


> I've loaded all modules built when using -enable-mods-shared=most and
> still no luck (same error). Here's the list:
>
> ./httpd -t -D DUMP_MODULES
> Loaded Modules:
> core_module (static)
> mpm_prefork_module (static)
> http_module (static)
> so_module (static)
> authn_file_module (shared)
> authn_dbm_module (shared)
> authn_anon_module (shared)
> authn_dbd_module (shared)
> authn_default_module (shared)
> authz_host_module (shared)
> authz_groupfile_module (shared)
> authz_user_module (shared)
> authz_dbm_module (shared)
> authz_owner_module (shared)
> authz_default_module (shared)
> auth_basic_module (shared)
> auth_digest_module (shared)
> dbd_module (shared)
> dumpio_module (shared)
> ext_filter_module (shared)
> include_module (shared)
> filter_module (shared)
> substitute_module (shared)
> deflate_module (shared)
> log_config_module (shared)
> logio_module (shared)
> env_module (shared)
> expires_module (shared)
> headers_module (shared)
> ident_module (shared)
> setenvif_module (shared)
> mime_module (shared)
> dav_module (shared)
> status_module (shared)
> autoindex_module (shared)
> asis_module (shared)
> info_module (shared)
> cgi_module (shared)
> dav_fs_module (shared)
> vhost_alias_module (shared)
> negotiation_module (shared)
> dir_module (shared)
> imagemap_module (shared)
> actions_module (shared)
> speling_module (shared)
> userdir_module (shared)
> alias_module (shared)
> rewrite_module (shared)
> php5_module (shared)
> Syntax OK
>
>
> Danie Qian wrote:
>>
>> ----- Original Message ----- From: "Steve Whitson"
>>
>> To:
>> Sent: Thursday, August 07, 2008 3:53 PM
>> Subject: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
>> authentication problems - apache 2.2.9
>>
>>
>>> I’m trying to use mod_dbd and mod_authn_dbd and replacements for
>>> mod_auth_mysql within an apache 2.2.9 server I built on solaris.
>>>
>>> I configure up the database info as such:
>>>
>>> DBDriver mysql
>>> DBDParams "host=somehostname dbname=somedatabasename user=someuser
>>> pass=somepass"
>>> DBDMin 4
>>> DBDKeep 8
>>> DBDMax 20
>>> DBDExptime 300
>>>
>>> I have the typical root directory configuration for the htdocs folder:
>>>
>>> Options Indexes FollowSymLinks MultiViews
>>> AllowOverride All
>>> Order allow,deny
>>> Allow from all
>>>
>>> AuthType Basic
>>> AuthName "Website Mysql Userdb Verification"
>>> AuthBasicProvider dbd
>>>
>>> AuthDBDUserPWQuery "select password from users where name = %s"
>>>
>>> ...
>>> When I start the server I get the following error:
>>>
>>> [notice] Apache/2.2.9 (Unix) DAV/2 PHP/5.2.6 SVN/1.5.1 configured --
>>> resuming normal operations
>>> [info] Server built: Aug 7 2008 11:06:05
>>> [debug] prefork.c(1001): AcceptMutex: fcntl (default: fcntl)
>>> [error] (20014)Internal error: DBD: failed to prepare SQL statements:
>>> Unknown command
>>> [error] (20014)Internal error: DBD: failed to initialise
>>>
>>> If I comment out the AuthDBDUserPWQuery entry, the DBD errors don’t
>>> occur.
>>>
>>> I also tried the entry
>>> DBDPrepareSQL "select password from users where name = %s" prepQuery
>>>
>>> I was thinking I could use the prepared query with AuthDBUserPWQuery.
>>> But, when only the DBDPrepareSQL is present (and not
>>> AuthDBuserPWQuery) apache still gives the same errors.
>>>
>>> Ideas? Is there something I’m dong wrong here?
>>>
>>> Thanks much,
>>>
>>> -Steve
>>>
>>
>> I have been using mod_dbd for authentication fine for over a year. You
>> syntax looks the same as mine so I guess you might be missing some
>> modules. the whole setup is a bunch of modules/libraries stacked together
>>


was mysql library installed when you built the httpd?


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: mod_dbd & mod_dbd_authn - mysql user authenticationproblems - apache 2.2.9

am 11.08.2008 17:17:46 von Steve Whitson

Danie Qian wrote:
>
> ----- Original Message ----- From: "Steve Whitson"
>
> To:
> Sent: Monday, August 11, 2008 9:24 AM
> Subject: Re: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
> authentication problems - apache 2.2.9
>
>
>> I've loaded all modules built when using -enable-mods-shared=most and
>> still no luck (same error). Here's the list:
>>
>> ./httpd -t -D DUMP_MODULES
>> Loaded Modules:
>> core_module (static)
>> mpm_prefork_module (static)
>> http_module (static)
>> so_module (static)
>> authn_file_module (shared)
>> authn_dbm_module (shared)
>> authn_anon_module (shared)
>> authn_dbd_module (shared)
>> authn_default_module (shared)
>> authz_host_module (shared)
>> authz_groupfile_module (shared)
>> authz_user_module (shared)
>> authz_dbm_module (shared)
>> authz_owner_module (shared)
>> authz_default_module (shared)
>> auth_basic_module (shared)
>> auth_digest_module (shared)
>> dbd_module (shared)
>> dumpio_module (shared)
>> ext_filter_module (shared)
>> include_module (shared)
>> filter_module (shared)
>> substitute_module (shared)
>> deflate_module (shared)
>> log_config_module (shared)
>> logio_module (shared)
>> env_module (shared)
>> expires_module (shared)
>> headers_module (shared)
>> ident_module (shared)
>> setenvif_module (shared)
>> mime_module (shared)
>> dav_module (shared)
>> status_module (shared)
>> autoindex_module (shared)
>> asis_module (shared)
>> info_module (shared)
>> cgi_module (shared)
>> dav_fs_module (shared)
>> vhost_alias_module (shared)
>> negotiation_module (shared)
>> dir_module (shared)
>> imagemap_module (shared)
>> actions_module (shared)
>> speling_module (shared)
>> userdir_module (shared)
>> alias_module (shared)
>> rewrite_module (shared)
>> php5_module (shared)
>> Syntax OK
>>
>>
>> Danie Qian wrote:
>>>
>>> ----- Original Message ----- From: "Steve Whitson"
>>>
>>> To:
>>> Sent: Thursday, August 07, 2008 3:53 PM
>>> Subject: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
>>> authentication problems - apache 2.2.9
>>>
>>>
>>>> I’m trying to use mod_dbd and mod_authn_dbd and replacements for
>>>> mod_auth_mysql within an apache 2.2.9 server I built on solaris.
>>>>
>>>> I configure up the database info as such:
>>>>
>>>> DBDriver mysql
>>>> DBDParams "host=somehostname dbname=somedatabasename user=someuser
>>>> pass=somepass"
>>>> DBDMin 4
>>>> DBDKeep 8
>>>> DBDMax 20
>>>> DBDExptime 300
>>>>
>>>> I have the typical root directory configuration for the htdocs folder:
>>>>
>>>> Options Indexes FollowSymLinks MultiViews
>>>> AllowOverride All
>>>> Order allow,deny
>>>> Allow from all
>>>>
>>>> AuthType Basic
>>>> AuthName "Website Mysql Userdb Verification"
>>>> AuthBasicProvider dbd
>>>>
>>>> AuthDBDUserPWQuery "select password from users where name = %s"
>>>>
>>>> ...
>>>> When I start the server I get the following error:
>>>>
>>>> [notice] Apache/2.2.9 (Unix) DAV/2 PHP/5.2.6 SVN/1.5.1 configured --
>>>> resuming normal operations
>>>> [info] Server built: Aug 7 2008 11:06:05
>>>> [debug] prefork.c(1001): AcceptMutex: fcntl (default: fcntl)
>>>> [error] (20014)Internal error: DBD: failed to prepare SQL statements:
>>>> Unknown command
>>>> [error] (20014)Internal error: DBD: failed to initialise
>>>>
>>>> If I comment out the AuthDBDUserPWQuery entry, the DBD errors don’t
>>>> occur.
>>>>
>>>> I also tried the entry
>>>> DBDPrepareSQL "select password from users where name = %s" prepQuery
>>>>
>>>> I was thinking I could use the prepared query with AuthDBUserPWQuery.
>>>> But, when only the DBDPrepareSQL is present (and not
>>>> AuthDBuserPWQuery) apache still gives the same errors.
>>>>
>>>> Ideas? Is there something I’m dong wrong here?
>>>>
>>>> Thanks much,
>>>>
>>>> -Steve
>>>>
>>>
>>> I have been using mod_dbd for authentication fine for over a year. You
>>> syntax looks the same as mine so I guess you might be missing some
>>> modules. the whole setup is a bunch of modules/libraries stacked
>>> together
>>>
>
>
> was mysql library installed when you built the httpd?
>
I got the error that the mysql library was missing a few days before. So
(to fix that error) I found instructions, which informed me to go to the
srclib/apr-util folder, where I built and installed while including the
mysql driver. apr version 1.3.0 is what is included in httpd 2.2.9.
After getting the noted error (my current problem), I tried building in
apr & apr-util v1.3.2, no change.

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: mod_dbd & mod_dbd_authn - mysql user authentication problems - apache 2.2.9

am 11.08.2008 19:37:59 von Danie Qian

----- Original Message -----
From: "Steve Whitson"
To:
Sent: Monday, August 11, 2008 11:17 AM
Subject: Re: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
authentication problems - apache 2.2.9


> Danie Qian wrote:
>>
>> ----- Original Message ----- From: "Steve Whitson"
>>
>> To:
>> Sent: Monday, August 11, 2008 9:24 AM
>> Subject: Re: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
>> authentication problems - apache 2.2.9
>>
>>
>>> I've loaded all modules built when using -enable-mods-shared=most and
>>> still no luck (same error). Here's the list:
>>>
>>> ./httpd -t -D DUMP_MODULES
>>> Loaded Modules:
>>> core_module (static)
>>> mpm_prefork_module (static)
>>> http_module (static)
>>> so_module (static)
>>> authn_file_module (shared)
>>> authn_dbm_module (shared)
>>> authn_anon_module (shared)
>>> authn_dbd_module (shared)
>>> authn_default_module (shared)
>>> authz_host_module (shared)
>>> authz_groupfile_module (shared)
>>> authz_user_module (shared)
>>> authz_dbm_module (shared)
>>> authz_owner_module (shared)
>>> authz_default_module (shared)
>>> auth_basic_module (shared)
>>> auth_digest_module (shared)
>>> dbd_module (shared)
>>> dumpio_module (shared)
>>> ext_filter_module (shared)
>>> include_module (shared)
>>> filter_module (shared)
>>> substitute_module (shared)
>>> deflate_module (shared)
>>> log_config_module (shared)
>>> logio_module (shared)
>>> env_module (shared)
>>> expires_module (shared)
>>> headers_module (shared)
>>> ident_module (shared)
>>> setenvif_module (shared)
>>> mime_module (shared)
>>> dav_module (shared)
>>> status_module (shared)
>>> autoindex_module (shared)
>>> asis_module (shared)
>>> info_module (shared)
>>> cgi_module (shared)
>>> dav_fs_module (shared)
>>> vhost_alias_module (shared)
>>> negotiation_module (shared)
>>> dir_module (shared)
>>> imagemap_module (shared)
>>> actions_module (shared)
>>> speling_module (shared)
>>> userdir_module (shared)
>>> alias_module (shared)
>>> rewrite_module (shared)
>>> php5_module (shared)
>>> Syntax OK
>>>
>>>
>>> Danie Qian wrote:
>>>>
>>>> ----- Original Message ----- From: "Steve Whitson"
>>>>
>>>> To:
>>>> Sent: Thursday, August 07, 2008 3:53 PM
>>>> Subject: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
>>>> authentication problems - apache 2.2.9
>>>>
>>>>
>>>>> I’m trying to use mod_dbd and mod_authn_dbd and replacements for
>>>>> mod_auth_mysql within an apache 2.2.9 server I built on solaris.
>>>>>
>>>>> I configure up the database info as such:
>>>>>
>>>>> DBDriver mysql
>>>>> DBDParams "host=somehostname dbname=somedatabasename user=someuser
>>>>> pass=somepass"
>>>>> DBDMin 4
>>>>> DBDKeep 8
>>>>> DBDMax 20
>>>>> DBDExptime 300
>>>>>
>>>>> I have the typical root directory configuration for the htdocs folder:
>>>>>
>>>>> Options Indexes FollowSymLinks MultiViews
>>>>> AllowOverride All
>>>>> Order allow,deny
>>>>> Allow from all
>>>>>
>>>>> AuthType Basic
>>>>> AuthName "Website Mysql Userdb Verification"
>>>>> AuthBasicProvider dbd
>>>>>
>>>>> AuthDBDUserPWQuery "select password from users where name = %s"
>>>>>
>>>>> ...
>>>>> When I start the server I get the following error:
>>>>>
>>>>> [notice] Apache/2.2.9 (Unix) DAV/2 PHP/5.2.6 SVN/1.5.1 configured --
>>>>> resuming normal operations
>>>>> [info] Server built: Aug 7 2008 11:06:05
>>>>> [debug] prefork.c(1001): AcceptMutex: fcntl (default: fcntl)
>>>>> [error] (20014)Internal error: DBD: failed to prepare SQL statements:
>>>>> Unknown command
>>>>> [error] (20014)Internal error: DBD: failed to initialise
>>>>>
>>>>> If I comment out the AuthDBDUserPWQuery entry, the DBD errors don’t
>>>>> occur.
>>>>>
>>>>> I also tried the entry
>>>>> DBDPrepareSQL "select password from users where name = %s" prepQuery
>>>>>
>>>>> I was thinking I could use the prepared query with AuthDBUserPWQuery.
>>>>> But, when only the DBDPrepareSQL is present (and not
>>>>> AuthDBuserPWQuery) apache still gives the same errors.
>>>>>
>>>>> Ideas? Is there something I’m dong wrong here?
>>>>>
>>>>> Thanks much,
>>>>>
>>>>> -Steve
>>>>>
>>>>
>>>> I have been using mod_dbd for authentication fine for over a year. You
>>>> syntax looks the same as mine so I guess you might be missing some
>>>> modules. the whole setup is a bunch of modules/libraries stacked
>>>> together
>>>>
>>
>>
>> was mysql library installed when you built the httpd?
>>
> I got the error that the mysql library was missing a few days before. So
> (to fix that error) I found instructions, which informed me to go to the
> srclib/apr-util folder, where I built and installed while including the
> mysql driver. apr version 1.3.0 is what is included in httpd 2.2.9.
> After getting the noted error (my current problem), I tried building in
> apr & apr-util v1.3.2, no change.
>

I am on httpd-2.2.6 where I had to download the mysql driver manually. you
are on httpd-2.2.9 so I believe you have it already built under
srclib/apr-util/dbd folder. But I read from some where on the apache website
that, when you build httpd-2.2.9 itself you need to add option --with-mysql


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: mod_dbd & mod_dbd_authn - mysql user authenticationproblems - apache 2.2.9

am 11.08.2008 21:15:37 von Steve Whitson

Danie Qian wrote:
>
> ----- Original Message ----- From: "Steve Whitson"
>
> To:
> Sent: Monday, August 11, 2008 11:17 AM
> Subject: Re: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
> authentication problems - apache 2.2.9
>
>
>> Danie Qian wrote:
>>>
>>> ----- Original Message ----- From: "Steve Whitson"
>>>
>>> To:
>>> Sent: Monday, August 11, 2008 9:24 AM
>>> Subject: Re: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
>>> authentication problems - apache 2.2.9
>>>
>>>
>>>> I've loaded all modules built when using -enable-mods-shared=most and
>>>> still no luck (same error). Here's the list:
>>>>
>>>> ./httpd -t -D DUMP_MODULES
>>>> Loaded Modules:
>>>> core_module (static)
>>>> mpm_prefork_module (static)
>>>> http_module (static)
>>>> so_module (static)
>>>> authn_file_module (shared)
>>>> authn_dbm_module (shared)
>>>> authn_anon_module (shared)
>>>> authn_dbd_module (shared)
>>>> authn_default_module (shared)
>>>> authz_host_module (shared)
>>>> authz_groupfile_module (shared)
>>>> authz_user_module (shared)
>>>> authz_dbm_module (shared)
>>>> authz_owner_module (shared)
>>>> authz_default_module (shared)
>>>> auth_basic_module (shared)
>>>> auth_digest_module (shared)
>>>> dbd_module (shared)
>>>> dumpio_module (shared)
>>>> ext_filter_module (shared)
>>>> include_module (shared)
>>>> filter_module (shared)
>>>> substitute_module (shared)
>>>> deflate_module (shared)
>>>> log_config_module (shared)
>>>> logio_module (shared)
>>>> env_module (shared)
>>>> expires_module (shared)
>>>> headers_module (shared)
>>>> ident_module (shared)
>>>> setenvif_module (shared)
>>>> mime_module (shared)
>>>> dav_module (shared)
>>>> status_module (shared)
>>>> autoindex_module (shared)
>>>> asis_module (shared)
>>>> info_module (shared)
>>>> cgi_module (shared)
>>>> dav_fs_module (shared)
>>>> vhost_alias_module (shared)
>>>> negotiation_module (shared)
>>>> dir_module (shared)
>>>> imagemap_module (shared)
>>>> actions_module (shared)
>>>> speling_module (shared)
>>>> userdir_module (shared)
>>>> alias_module (shared)
>>>> rewrite_module (shared)
>>>> php5_module (shared)
>>>> Syntax OK
>>>>
>>>>
>>>> Danie Qian wrote:
>>>>>
>>>>> ----- Original Message ----- From: "Steve Whitson"
>>>>>
>>>>> To:
>>>>> Sent: Thursday, August 07, 2008 3:53 PM
>>>>> Subject: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
>>>>> authentication problems - apache 2.2.9
>>>>>
>>>>>
>>>>>> I’m trying to use mod_dbd and mod_authn_dbd and replacements for
>>>>>> mod_auth_mysql within an apache 2.2.9 server I built on solaris.
>>>>>>
>>>>>> I configure up the database info as such:
>>>>>>
>>>>>> DBDriver mysql
>>>>>> DBDParams "host=somehostname dbname=somedatabasename user=someuser
>>>>>> pass=somepass"
>>>>>> DBDMin 4
>>>>>> DBDKeep 8
>>>>>> DBDMax 20
>>>>>> DBDExptime 300
>>>>>>
>>>>>> I have the typical root directory configuration for the htdocs
>>>>>> folder:
>>>>>>
>>>>>> Options Indexes FollowSymLinks MultiViews
>>>>>> AllowOverride All
>>>>>> Order allow,deny
>>>>>> Allow from all
>>>>>>
>>>>>> AuthType Basic
>>>>>> AuthName "Website Mysql Userdb Verification"
>>>>>> AuthBasicProvider dbd
>>>>>>
>>>>>> AuthDBDUserPWQuery "select password from users where name = %s"
>>>>>>
>>>>>> ...
>>>>>> When I start the server I get the following error:
>>>>>>
>>>>>> [notice] Apache/2.2.9 (Unix) DAV/2 PHP/5.2.6 SVN/1.5.1 configured --
>>>>>> resuming normal operations
>>>>>> [info] Server built: Aug 7 2008 11:06:05
>>>>>> [debug] prefork.c(1001): AcceptMutex: fcntl (default: fcntl)
>>>>>> [error] (20014)Internal error: DBD: failed to prepare SQL
>>>>>> statements:
>>>>>> Unknown command
>>>>>> [error] (20014)Internal error: DBD: failed to initialise
>>>>>>
>>>>>> If I comment out the AuthDBDUserPWQuery entry, the DBD errors don’t
>>>>>> occur.
>>>>>>
>>>>>> I also tried the entry
>>>>>> DBDPrepareSQL "select password from users where name = %s" prepQuery
>>>>>>
>>>>>> I was thinking I could use the prepared query with
>>>>>> AuthDBUserPWQuery.
>>>>>> But, when only the DBDPrepareSQL is present (and not
>>>>>> AuthDBuserPWQuery) apache still gives the same errors.
>>>>>>
>>>>>> Ideas? Is there something I’m dong wrong here?
>>>>>>
>>>>>> Thanks much,
>>>>>>
>>>>>> -Steve
>>>>>>
>>>>>
>>>>> I have been using mod_dbd for authentication fine for over a year.
>>>>> You
>>>>> syntax looks the same as mine so I guess you might be missing some
>>>>> modules. the whole setup is a bunch of modules/libraries stacked
>>>>> together
>>>>>
>>>
>>>
>>> was mysql library installed when you built the httpd?
>>>
>> I got the error that the mysql library was missing a few days before. So
>> (to fix that error) I found instructions, which informed me to go to the
>> srclib/apr-util folder, where I built and installed while including the
>> mysql driver. apr version 1.3.0 is what is included in httpd 2.2.9.
>> After getting the noted error (my current problem), I tried building in
>> apr & apr-util v1.3.2, no change.
>>
>
> I am on httpd-2.2.6 where I had to download the mysql driver manually.
> you are on httpd-2.2.9 so I believe you have it already built under
> srclib/apr-util/dbd folder. But I read from some where on the apache
> website that, when you build httpd-2.2.9 itself you need to add option
> --with-mysql
>
>
Yes! Exactly... and oddly enough the flag isn't recognized by the
top-level configure script. I first built with this flag in the apr-util
folder (following some instructions I found). Later I cleaned the httpd
build and rebuild with that flag, and it did rebuild the mysql driver
(which I verified apr_dbd_mysql file dates in install folders). The flag
was properly passed on to the apr-util configuration.


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: mod_dbd & mod_dbd_authn - mysql user authenticationproblems - apache 2.2.9

am 14.08.2008 16:00:49 von Steve Whitson

--------------020205080706020101050707
Content-Type: text/plain; charset=GB2312
Content-Transfer-Encoding: 8bit

Steve Whitson wrote:
> Danie Qian wrote:
>
>> ----- Original Message ----- From: "Steve Whitson"
>>
>> To:
>> Sent: Monday, August 11, 2008 11:17 AM
>> Subject: Re: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
>> authentication problems - apache 2.2.9
>>
>>
>>
>>> Danie Qian wrote:
>>>
>>>> ----- Original Message ----- From: "Steve Whitson"
>>>>
>>>> To:
>>>> Sent: Monday, August 11, 2008 9:24 AM
>>>> Subject: Re: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
>>>> authentication problems - apache 2.2.9
>>>>
>>>>
>>>>
>>>>> I've loaded all modules built when using -enable-mods-shared=most and
>>>>> still no luck (same error). Here's the list:
>>>>>
>>>>> ./httpd -t -D DUMP_MODULES
>>>>> Loaded Modules:
>>>>> core_module (static)
>>>>> mpm_prefork_module (static)
>>>>> http_module (static)
>>>>> so_module (static)
>>>>> authn_file_module (shared)
>>>>> authn_dbm_module (shared)
>>>>> authn_anon_module (shared)
>>>>> authn_dbd_module (shared)
>>>>> authn_default_module (shared)
>>>>> authz_host_module (shared)
>>>>> authz_groupfile_module (shared)
>>>>> authz_user_module (shared)
>>>>> authz_dbm_module (shared)
>>>>> authz_owner_module (shared)
>>>>> authz_default_module (shared)
>>>>> auth_basic_module (shared)
>>>>> auth_digest_module (shared)
>>>>> dbd_module (shared)
>>>>> dumpio_module (shared)
>>>>> ext_filter_module (shared)
>>>>> include_module (shared)
>>>>> filter_module (shared)
>>>>> substitute_module (shared)
>>>>> deflate_module (shared)
>>>>> log_config_module (shared)
>>>>> logio_module (shared)
>>>>> env_module (shared)
>>>>> expires_module (shared)
>>>>> headers_module (shared)
>>>>> ident_module (shared)
>>>>> setenvif_module (shared)
>>>>> mime_module (shared)
>>>>> dav_module (shared)
>>>>> status_module (shared)
>>>>> autoindex_module (shared)
>>>>> asis_module (shared)
>>>>> info_module (shared)
>>>>> cgi_module (shared)
>>>>> dav_fs_module (shared)
>>>>> vhost_alias_module (shared)
>>>>> negotiation_module (shared)
>>>>> dir_module (shared)
>>>>> imagemap_module (shared)
>>>>> actions_module (shared)
>>>>> speling_module (shared)
>>>>> userdir_module (shared)
>>>>> alias_module (shared)
>>>>> rewrite_module (shared)
>>>>> php5_module (shared)
>>>>> Syntax OK
>>>>>
>>>>>
>>>>> Danie Qian wrote:
>>>>>
>>>>>> ----- Original Message ----- From: "Steve Whitson"
>>>>>>
>>>>>> To:
>>>>>> Sent: Thursday, August 07, 2008 3:53 PM
>>>>>> Subject: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
>>>>>> authentication problems - apache 2.2.9
>>>>>>
>>>>>>
>>>>>>
>>>>>>> I’m trying to use mod_dbd and mod_authn_dbd and replacements for
>>>>>>> mod_auth_mysql within an apache 2.2.9 server I built on solaris.
>>>>>>>
>>>>>>> I configure up the database info as such:
>>>>>>>
>>>>>>> DBDriver mysql
>>>>>>> DBDParams "host=somehostname dbname=somedatabasename user=someuser
>>>>>>> pass=somepass"
>>>>>>> DBDMin 4
>>>>>>> DBDKeep 8
>>>>>>> DBDMax 20
>>>>>>> DBDExptime 300
>>>>>>>
>>>>>>> I have the typical root directory configuration for the htdocs
>>>>>>> folder:
>>>>>>>
>>>>>>> Options Indexes FollowSymLinks MultiViews
>>>>>>> AllowOverride All
>>>>>>> Order allow,deny
>>>>>>> Allow from all
>>>>>>>
>>>>>>> AuthType Basic
>>>>>>> AuthName "Website Mysql Userdb Verification"
>>>>>>> AuthBasicProvider dbd
>>>>>>>
>>>>>>> AuthDBDUserPWQuery "select password from users where name = %s"
>>>>>>>
>>>>>>> ...
>>>>>>> When I start the server I get the following error:
>>>>>>>
>>>>>>> [notice] Apache/2.2.9 (Unix) DAV/2 PHP/5.2.6 SVN/1.5.1 configured --
>>>>>>> resuming normal operations
>>>>>>> [info] Server built: Aug 7 2008 11:06:05
>>>>>>> [debug] prefork.c(1001): AcceptMutex: fcntl (default: fcntl)
>>>>>>> [error] (20014)Internal error: DBD: failed to prepare SQL
>>>>>>> statements:
>>>>>>> Unknown command
>>>>>>> [error] (20014)Internal error: DBD: failed to initialise
>>>>>>>
>>>>>>> If I comment out the AuthDBDUserPWQuery entry, the DBD errors don’t
>>>>>>> occur.
>>>>>>>
>>>>>>> I also tried the entry
>>>>>>> DBDPrepareSQL "select password from users where name = %s" prepQuery
>>>>>>>
>>>>>>> I was thinking I could use the prepared query with
>>>>>>> AuthDBUserPWQuery.
>>>>>>> But, when only the DBDPrepareSQL is present (and not
>>>>>>> AuthDBuserPWQuery) apache still gives the same errors.
>>>>>>>
>>>>>>> Ideas? Is there something I’m dong wrong here?
>>>>>>>
>>>>>>> Thanks much,
>>>>>>>
>>>>>>> -Steve
>>>>>>>
>>>>>>>
>>>>>> I have been using mod_dbd for authentication fine for over a year.
>>>>>> You
>>>>>> syntax looks the same as mine so I guess you might be missing some
>>>>>> modules. the whole setup is a bunch of modules/libraries stacked
>>>>>> together
>>>>>>
>>>>>>
>>>> was mysql library installed when you built the httpd?
>>>>
>>>>
>>> I got the error that the mysql library was missing a few days before. So
>>> (to fix that error) I found instructions, which informed me to go to the
>>> srclib/apr-util folder, where I built and installed while including the
>>> mysql driver. apr version 1.3.0 is what is included in httpd 2.2.9.
>>> After getting the noted error (my current problem), I tried building in
>>> apr & apr-util v1.3.2, no change.
>>>
>>>
>> I am on httpd-2.2.6 where I had to download the mysql driver manually.
>> you are on httpd-2.2.9 so I believe you have it already built under
>> srclib/apr-util/dbd folder. But I read from some where on the apache
>> website that, when you build httpd-2.2.9 itself you need to add option
>> --with-mysql
>>
>>
>>
> Yes! Exactly... and oddly enough the flag isn't recognized by the
> top-level configure script. I first built with this flag in the apr-util
> folder (following some instructions I found). Later I cleaned the httpd
> build and rebuild with that flag, and it did rebuild the mysql driver
> (which I verified apr_dbd_mysql file dates in install folders). The flag
> was properly passed on to the apr-util configuration.
>
>
Well, I've settled with my older mod_auth_mysql solution along with
apache 2.0.63. My goal was to use subversion 1.5.1 with apache 2.2.x
along with the newer mysql access mechanisms for security (for both
subversion areas and other realms). I'll wait for another day & later
versions to try again...hoping things do get sorted out by then.

Thanks much for your feedback! :)
-Steve

--------------020205080706020101050707
Content-Type: text/html; charset=GB2312
Content-Transfer-Encoding: 8bit







Steve Whitson wrote:


Danie Qian wrote:


----- Original Message ----- From: "Steve Whitson"

To:
Sent: Monday, August 11, 2008 11:17 AM
Subject: Re: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
authentication problems - apache 2.2.9




Danie Qian wrote:


----- Original Message ----- From: "Steve Whitson"

To:
Sent: Monday, August 11, 2008 9:24 AM
Subject: Re: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
authentication problems - apache 2.2.9




I've loaded all modules built when using -enable-mods-shared=most and
still no luck (same error). Here's the list:

../httpd -t -D DUMP_MODULES
Loaded Modules:
core_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
authn_file_module (shared)
authn_dbm_module (shared)
authn_anon_module (shared)
authn_dbd_module (shared)
authn_default_module (shared)
authz_host_module (shared)
authz_groupfile_module (shared)
authz_user_module (shared)
authz_dbm_module (shared)
authz_owner_module (shared)
authz_default_module (shared)
auth_basic_module (shared)
auth_digest_module (shared)
dbd_module (shared)
dumpio_module (shared)
ext_filter_module (shared)
include_module (shared)
filter_module (shared)
substitute_module (shared)
deflate_module (shared)
log_config_module (shared)
logio_module (shared)
env_module (shared)
expires_module (shared)
headers_module (shared)
ident_module (shared)
setenvif_module (shared)
mime_module (shared)
dav_module (shared)
status_module (shared)
autoindex_module (shared)
asis_module (shared)
info_module (shared)
cgi_module (shared)
dav_fs_module (shared)
vhost_alias_module (shared)
negotiation_module (shared)
dir_module (shared)
imagemap_module (shared)
actions_module (shared)
speling_module (shared)
userdir_module (shared)
alias_module (shared)
rewrite_module (shared)
php5_module (shared)
Syntax OK


Danie Qian wrote:


----- Original Message ----- From: "Steve Whitson"

To:
Sent: Thursday, August 07, 2008 3:53 PM
Subject: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
authentication problems - apache 2.2.9




I’m trying to use mod_dbd and mod_authn_dbd and replacements for
mod_auth_mysql within an apache 2.2.9 server I built on solaris.

I configure up the database info as such:

DBDriver mysql
DBDParams "host=somehostname dbname=somedatabasename user=someuser
pass=somepass"
DBDMin 4
DBDKeep 8
DBDMax 20
DBDExptime 300

I have the typical root directory configuration for the htdocs
folder:

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all

AuthType Basic
AuthName "Website Mysql Userdb Verification"
AuthBasicProvider dbd

AuthDBDUserPWQuery "select password from users where name = %s"

....
When I start the server I get the following error:

[notice] Apache/2.2.9 (Unix) DAV/2 PHP/5.2.6 SVN/1.5.1 configured --
resuming normal operations
[info] Server built: Aug 7 2008 11:06:05
[debug] prefork.c(1001): AcceptMutex: fcntl (default: fcntl)
[error] (20014)Internal error: DBD: failed to prepare SQL
statements:
Unknown command
[error] (20014)Internal error: DBD: failed to initialise

If I comment out the AuthDBDUserPWQuery entry, the DBD errors don’t
occur.

I also tried the entry
DBDPrepareSQL "select password from users where name = %s" prepQuery

I was thinking I could use the prepared query with
AuthDBUserPWQuery.
But, when only the DBDPrepareSQL is present (and not
AuthDBuserPWQuery) apache still gives the same errors.

Ideas? Is there something I’m dong wrong here?

Thanks much,

-Steve



I have been using mod_dbd for authentication fine for over a year.
You
syntax looks the same as mine so I guess you might be missing some
modules. the whole setup is a bunch of modules/libraries stacked
together





was mysql library installed when you built the httpd?



I got the error that the mysql library was missing a few days before. So
(to fix that error) I found instructions, which informed me to go to the
srclib/apr-util folder, where I built and installed while including the
mysql driver. apr version 1.3.0 is what is included in httpd 2.2.9.
After getting the noted error (my current problem), I tried building in
apr & apr-util v1.3.2, no change.



I am on httpd-2.2.6 where I had to download the mysql driver manually.
you are on httpd-2.2.9 so I believe you have it already built under
srclib/apr-util/dbd folder. But I read from some where on the apache
website that, when you build httpd-2.2.9 itself you need to add option
--with-mysql




Yes! Exactly... and oddly enough the flag isn't recognized by the
top-level configure script. I first built with this flag in the apr-util
folder (following some instructions I found). Later I cleaned the httpd
build and rebuild with that flag, and it did rebuild the mysql driver
(which I verified apr_dbd_mysql file dates in install folders). The flag
was properly passed on to the apr-util configuration.



Well, I've settled with my older mod_auth_mysql solution along with
apache 2.0.63.  My goal was to use subversion 1.5.1 with apache 2.2.x
along with the newer mysql access mechanisms for security (for both
subversion areas and other realms).   I'll wait for another day &
later versions to try again...hoping things do get sorted out by then.



Thanks much for your feedback! :)

    -Steve




--------------020205080706020101050707--

Re: mod_dbd & mod_dbd_authn - mysql user authentication problems - apache 2.2.9

am 14.08.2008 20:33:18 von Danie Qian

------=_NextPart_000_02A8_01C8FE1A.B1B6C850
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable

----- Original Message -----=20
From: Steve Whitson=20
To: users@httpd.apache.org=20
Sent: Thursday, August 14, 2008 10:00 AM
Subject: Re: [users@httpd] mod_dbd & mod_dbd_authn - mysql user =
authentication problems - apache 2.2.9


Steve Whitson wrote:=20
Danie Qian wrote:
----- Original Message ----- From: "Steve Whitson"

To:
Sent: Monday, August 11, 2008 11:17 AM
Subject: Re: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
authentication problems - apache 2.2.9


Danie Qian wrote:
----- Original Message ----- From: "Steve Whitson"

To:
Sent: Monday, August 11, 2008 9:24 AM
Subject: Re: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
authentication problems - apache 2.2.9


I've loaded all modules built when using =
-enable-mods-shared=3Dmost and
still no luck (same error). Here's the list:

../httpd -t -D DUMP_MODULES
Loaded Modules:
core_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
authn_file_module (shared)
authn_dbm_module (shared)
authn_anon_module (shared)
authn_dbd_module (shared)
authn_default_module (shared)
authz_host_module (shared)
authz_groupfile_module (shared)
authz_user_module (shared)
authz_dbm_module (shared)
authz_owner_module (shared)
authz_default_module (shared)
auth_basic_module (shared)
auth_digest_module (shared)
dbd_module (shared)
dumpio_module (shared)
ext_filter_module (shared)
include_module (shared)
filter_module (shared)
substitute_module (shared)
deflate_module (shared)
log_config_module (shared)
logio_module (shared)
env_module (shared)
expires_module (shared)
headers_module (shared)
ident_module (shared)
setenvif_module (shared)
mime_module (shared)
dav_module (shared)
status_module (shared)
autoindex_module (shared)
asis_module (shared)
info_module (shared)
cgi_module (shared)
dav_fs_module (shared)
vhost_alias_module (shared)
negotiation_module (shared)
dir_module (shared)
imagemap_module (shared)
actions_module (shared)
speling_module (shared)
userdir_module (shared)
alias_module (shared)
rewrite_module (shared)
php5_module (shared)
Syntax OK


Danie Qian wrote:
----- Original Message ----- From: "Steve Whitson"

To:
Sent: Thursday, August 07, 2008 3:53 PM
Subject: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
authentication problems - apache 2.2.9


I=92m trying to use mod_dbd and mod_authn_dbd and =
replacements for
mod_auth_mysql within an apache 2.2.9 server I built on solaris.

I configure up the database info as such:

DBDriver mysql
DBDParams "host=3Dsomehostname dbname=3Dsomedatabasename user=3Dsomeuser
pass=3Dsomepass"
DBDMin 4
DBDKeep 8
DBDMax 20
DBDExptime 300

I have the typical root directory configuration for the htdocs
folder:

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all

AuthType Basic
AuthName "Website Mysql Userdb Verification"
AuthBasicProvider dbd

AuthDBDUserPWQuery "select password from users where name =3D %s"

....
When I start the server I get the following error:

[notice] Apache/2.2.9 (Unix) DAV/2 PHP/5.2.6 SVN/1.5.1 configured --
resuming normal operations
[info] Server built: Aug 7 2008 11:06:05
[debug] prefork.c(1001): AcceptMutex: fcntl (default: fcntl)
[error] (20014)Internal error: DBD: failed to prepare SQL
statements:
Unknown command
[error] (20014)Internal error: DBD: failed to initialise

If I comment out the AuthDBDUserPWQuery entry, the DBD errors don=92t
occur.

I also tried the entry
DBDPrepareSQL "select password from users where name =3D %s" prepQuery

I was thinking I could use the prepared query with
AuthDBUserPWQuery.
But, when only the DBDPrepareSQL is present (and not
AuthDBuserPWQuery) apache still gives the same errors.

Ideas? Is there something I=92m dong wrong here?

Thanks much,

-Steve

I have been using mod_dbd for authentication fine for over =
a year.
You
syntax looks the same as mine so I guess you might be missing some
modules. the whole setup is a bunch of modules/libraries stacked
together

was mysql library installed when you built the httpd?

I got the error that the mysql library was missing a few days =
before. So
(to fix that error) I found instructions, which informed me to go to the
srclib/apr-util folder, where I built and installed while including the
mysql driver. apr version 1.3.0 is what is included in httpd 2.2.9.
After getting the noted error (my current problem), I tried building in
apr & apr-util v1.3.2, no change.

I am on httpd-2.2.6 where I had to download the mysql driver =
manually.
you are on httpd-2.2.9 so I believe you have it already built under
srclib/apr-util/dbd folder. But I read from some where on the apache
website that, when you build httpd-2.2.9 itself you need to add option
--with-mysql


Yes! Exactly... and oddly enough the flag isn't recognized by the
top-level configure script. I first built with this flag in the apr-util
folder (following some instructions I found). Later I cleaned the httpd
build and rebuild with that flag, and it did rebuild the mysql driver
(which I verified apr_dbd_mysql file dates in install folders). The flag
was properly passed on to the apr-util configuration.

Well, I've settled with my older mod_auth_mysql solution along with =
apache 2.0.63. My goal was to use subversion 1.5.1 with apache 2.2.x =
along with the newer mysql access mechanisms for security (for both =
subversion areas and other realms). I'll wait for another day & later =
versions to try again...hoping things do get sorted out by then.

Thanks much for your feedback! :)
-Steve

One more try you can do is to build the apr outside of Apache and link =
to it later when you compile apache itself. but still you need to make =
sure mysql is compiled in apr .so files. I built my first mod_dbd box =
this way.

------=_NextPart_000_02A8_01C8FE1A.B1B6C850
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable









style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
----- Original Message -----

style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black">From:=20
href=3D"mailto:steven.whitson@gmail.com">Steve=20
Whitson

To: title=3Dusers@httpd.apache.org=20
href=3D"mailto:users@httpd.apache.org">users@httpd.apache.or g
=

Sent: Thursday, August 14, 2008 =
10:00=20
AM

Subject: Re: [users@httpd] =
mod_dbd &=20
mod_dbd_authn - mysql user authentication problems - apache =
2.2.9


Steve Whitson wrote:=20
wrap=3D"">Danie Qian wrote:

----- Original Message =
----- From: "Steve Whitson"
href=3D"mailto:steven.whitson@gmail.com>"><steven.whitson@gmail.com>=
;

To: href=3D"mailto:users@httpd.apache.org>"><users@httpd.apache.org > >
Sent: Monday, August 11, 2008 11:17 AM
Subject: Re: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
authentication problems - apache 2.2.9



Danie Qian wrote:

----- Original Message =
----- From: "Steve Whitson"
href=3D"mailto:steven.whitson@gmail.com"><steven.whitson@gmail.com >=

To: href=3D"mailto:users@httpd.apache.org"><users@httpd.apache.org >=

Sent: Monday, August 11, 2008 9:24 AM
Subject: Re: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
authentication problems - apache 2.2.9



I've loaded all =
modules built when using -enable-mods-shared=3Dmost and
still no luck (same error). Here's the list:

../httpd -t -D DUMP_MODULES
Loaded Modules:
core_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
authn_file_module (shared)
authn_dbm_module (shared)
authn_anon_module (shared)
authn_dbd_module (shared)
authn_default_module (shared)
authz_host_module (shared)
authz_groupfile_module (shared)
authz_user_module (shared)
authz_dbm_module (shared)
authz_owner_module (shared)
authz_default_module (shared)
auth_basic_module (shared)
auth_digest_module (shared)
dbd_module (shared)
dumpio_module (shared)
ext_filter_module (shared)
include_module (shared)
filter_module (shared)
substitute_module (shared)
deflate_module (shared)
log_config_module (shared)
logio_module (shared)
env_module (shared)
expires_module (shared)
headers_module (shared)
ident_module (shared)
setenvif_module (shared)
mime_module (shared)
dav_module (shared)
status_module (shared)
autoindex_module (shared)
asis_module (shared)
info_module (shared)
cgi_module (shared)
dav_fs_module (shared)
vhost_alias_module (shared)
negotiation_module (shared)
dir_module (shared)
imagemap_module (shared)
actions_module (shared)
speling_module (shared)
userdir_module (shared)
alias_module (shared)
rewrite_module (shared)
php5_module (shared)
Syntax OK


Danie Qian wrote:

----- Original =
Message ----- From: "Steve Whitson"
href=3D"mailto:steven.whitson@gmail.com"><steven.whitson@gmail.com >=

To: href=3D"mailto:users@httpd.apache.org"><users@httpd.apache.org >=

Sent: Thursday, August 07, 2008 3:53 PM
Subject: [users@httpd] mod_dbd & mod_dbd_authn - mysql user
authentication problems - apache 2.2.9



I=92m trying to =
use mod_dbd and mod_authn_dbd and replacements for
mod_auth_mysql within an apache 2.2.9 server I built on solaris.

I configure up the database info as such:

DBDriver mysql
DBDParams "host=3Dsomehostname dbname=3Dsomedatabasename user=3Dsomeuser
pass=3Dsomepass"
DBDMin 4
DBDKeep 8
DBDMax 20
DBDExptime 300

I have the typical root directory configuration for the htdocs
folder:

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all

AuthType Basic
AuthName "Website Mysql Userdb Verification"
AuthBasicProvider dbd

AuthDBDUserPWQuery "select password from users where name =3D %s"

....
When I start the server I get the following error:

[notice] Apache/2.2.9 (Unix) DAV/2 PHP/5.2.6 SVN/1.5.1 configured --
resuming normal operations
[info] Server built: Aug 7 2008 11:06:05
[debug] prefork.c(1001): AcceptMutex: fcntl (default: fcntl)
[error] (20014)Internal error: DBD: failed to prepare SQL
statements:
Unknown command
[error] (20014)Internal error: DBD: failed to initialise

If I comment out the AuthDBDUserPWQuery entry, the DBD errors don=92t
occur.

I also tried the entry
DBDPrepareSQL "select password from users where name =3D %s" prepQuery

I was thinking I could use the prepared query with
AuthDBUserPWQuery.
But, when only the DBDPrepareSQL is present (and not
AuthDBuserPWQuery) apache still gives the same errors.

Ideas? Is there something I=92m dong wrong here?

Thanks much,

-Steve

I have been using =
mod_dbd for authentication fine for over a year.
You
syntax looks the same as mine so I guess you might be missing some
modules. the whole setup is a bunch of modules/libraries stacked
together

was mysql =
library installed when you built the httpd?

I got the error that the mysql =
library was missing a few days before. So
(to fix that error) I found instructions, which informed me to go to the
srclib/apr-util folder, where I built and installed while including the
mysql driver. apr version 1.3.0 is what is included in httpd 2.2.9.
After getting the noted error (my current problem), I tried building in
apr & apr-util v1.3.2, no change.

I am on httpd-2.2.6 where I had =
to download the mysql driver manually.
you are on httpd-2.2.9 so I believe you have it already built under
srclib/apr-util/dbd folder. But I read from some where on the apache
website that, when you build httpd-2.2.9 itself you need to add option
--with-mysql


Yes! Exactly... and oddly =
enough the flag isn't recognized by the
top-level configure script. I first built with this flag in the apr-util
folder (following some instructions I found). Later I cleaned the httpd
build and rebuild with that flag, and it did rebuild the mysql driver
(which I verified apr_dbd_mysql file dates in install folders). The flag
was properly passed on to the apr-util configuration.

Well, I've settled with my older mod_auth_mysql =
solution=20
along with apache 2.0.63.  My goal was to use subversion 1.5.1 =
with=20
apache 2.2.x along with the newer mysql access mechanisms for security =
(for=20
both subversion areas and other realms).   I'll wait for =
another day=20
& later versions to try again...hoping things do get sorted out by =

then.

Thanks much for your feedback! :)
   =20
-Steve

 

One more try you can do is to build the =
apr outside=20
of Apache and link to it later when you compile apache itself. but still =
you=20
need to make sure mysql is compiled in apr .so files. I built my first =
mod_dbd=20
box this way.

 


------=_NextPart_000_02A8_01C8FE1A.B1B6C850--

Re: mod_dbd & mod_dbd_authn - mysql user authenticationproblems - apache 2.2.9

am 15.08.2008 01:14:59 von unknown

Post removed (X-No-Archive: yes)

Re: mod_dbd & mod_dbd_authn - mysql userauthentication problems - apache 2.2.9

am 15.08.2008 12:47:51 von Nick Kew

On Fri, 15 Aug 2008 09:14:59 +1000 (EST)
Res wrote:

>
> Steve,
> Did you check out the URL I sent you in pvt email a few days
> ago? Either way, looks OK below, run this now (alter path to httpd)
>
> ldd /usr/local/apache/bin/httpd | grep libmysqlclient_r

You won't see that if you've built apr-util with dynamic loading
of DBD drivers (as is the default in APR-1.3.x).

--
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: mod_dbd & mod_dbd_authn - mysql user authenticationproblems - apache 2.2.9

am 15.08.2008 13:12:52 von unknown

Post removed (X-No-Archive: yes)

Re: mod_dbd & mod_dbd_authn - mysql user authenticationproblems - apache 2.2.9

am 15.08.2008 13:50:37 von Tom Donovan

Steve Whitson wrote:

>> When I start the server I get the following error:
>>
>> [notice] Apache/2.2.9 (Unix) DAV/2 PHP/5.2.6 SVN/1.5.1 configured --
>> resuming normal operations
>> [info] Server built: Aug 7 2008 11:06:05
>> [debug] prefork.c(1001): AcceptMutex: fcntl (default: fcntl)
>> [error] (20014)Internal error: DBD: failed to prepare SQL
>> statements:
>> Unknown command
>> [error] (20014)Internal error: DBD: failed to initialise
>>

Since you get to the point of preparing your SQL statement when the error occurs, apache has already
successfully connected to your mysql database. This pretty much rules out missing libraries, etc.

The problem seems to be that mysql is returning "Unknown command" in response to your SQL statement:

"select password from users where name = %s"

The apache part of the error message is as expected, but the mysql-supplied part of the message is
"Unknown command". FYI - this is what a log entry for an invalid SQL statement looks like:

[Fri Aug 15 07:35:09 2008] [error] (20014)Internal error: DBD: failed to prepare SQL statements: You
have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for
the right syntax to use near 'selectXX password from users where name = ?' at line 1
[Fri Aug 15 07:35:09 2008] [error] (20014)Internal error: DBD: failed to initialise

You are using mysql version 5.0, right?

-tom-

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: mod_dbd & mod_dbd_authn - mysql user authenticationproblems - apache 2.2.9

am 15.08.2008 17:22:43 von Steve Whitson

Tom Donovan wrote:
> Steve Whitson wrote:
>
>>> When I start the server I get the following error:
>>>
>>> [notice] Apache/2.2.9 (Unix) DAV/2 PHP/5.2.6 SVN/1.5.1 configured --
>>> resuming normal operations
>>> [info] Server built: Aug 7 2008 11:06:05
>>> [debug] prefork.c(1001): AcceptMutex: fcntl (default: fcntl)
>>> [error] (20014)Internal error: DBD: failed to prepare SQL
>>> statements:
>>> Unknown command
>>> [error] (20014)Internal error: DBD: failed to initialise
>>>
>
> Since you get to the point of preparing your SQL statement when the
> error occurs, apache has already successfully connected to your mysql
> database. This pretty much rules out missing libraries, etc.
>
> The problem seems to be that mysql is returning "Unknown command" in
> response to your SQL statement:
>
> "select password from users where name = %s"
>
> The apache part of the error message is as expected, but the
> mysql-supplied part of the message is "Unknown command". FYI - this
> is what a log entry for an invalid SQL statement looks like:
>
> [Fri Aug 15 07:35:09 2008] [error] (20014)Internal error: DBD: failed
> to prepare SQL statements: You have an error in your SQL syntax; check
> the manual that corresponds to your MySQL server version for the right
> syntax to use near 'selectXX password from users where name = ?' at
> line 1
> [Fri Aug 15 07:35:09 2008] [error] (20014)Internal error: DBD: failed
> to initialise
>
> You are using mysql version 5.0, right?
>
> -tom-
The version of mysql apache is building against is 5.0.37. The server
I'm connecting (which should not be the issue) is 4.0.11a (I hope to
upgrade this year).

I've tried changing the connect info to something that won't work, which
as expected gives me a connection error.... so as you point out the
connection is occurring. As you stated, for some reason the query is
failing, yet works from other clients just fine.

Thanks much,
-Steve


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: mod_dbd & mod_dbd_authn - mysql userauthentication problems - apache 2.2.9

am 15.08.2008 19:04:09 von Nick Kew

On Fri, 15 Aug 2008 10:22:43 -0500
Steve Whitson wrote:


> The version of mysql apache is building against is 5.0.37. The
> server I'm connecting (which should not be the issue) is 4.0.11a (I
> hope to upgrade this year).

It probably is. The MySQL driver was originally written for MySQL 4.1,
and uses SQL and API functions not available in 4.0.

In other words, you have an unsupported version.

--
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: mod_dbd & mod_dbd_authn - mysql user authenticationproblems - apache 2.2.9

am 15.08.2008 19:13:36 von Steve Whitson

--------------050406010009090000050505
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Nick Kew wrote:
> On Fri, 15 Aug 2008 10:22:43 -0500
> Steve Whitson wrote:
>
>
>
>> The version of mysql apache is building against is 5.0.37. The
>> server I'm connecting (which should not be the issue) is 4.0.11a (I
>> hope to upgrade this year).
>>
>
> It probably is. The MySQL driver was originally written for MySQL 4.1,
> and uses SQL and API functions not available in 4.0.
>
> In other words, you have an unsupported version.
>
>
When I get time (likely next week) I'll try using a db-copy in a mysql
5.x server (several to choose from). Maybe upgrading that mysql server
will become higher priority! :)

Thanks much,
-Steve

--------------050406010009090000050505
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit







Nick Kew wrote:


On Fri, 15 Aug 2008 10:22:43 -0500
Steve Whitson wrote:




The version of mysql apache is building against is 5.0.37.  The
server I'm connecting (which should not be the issue) is 4.0.11a (I
hope to upgrade this year).



It probably is. The MySQL driver was originally written for MySQL 4.1,
and uses SQL and API functions not available in 4.0.

In other words, you have an unsupported version.



When I get time (likely next week) I'll try using a db-copy in a mysql
5.x server (several to choose from).  Maybe upgrading that mysql server
will become higher priority! :)



Thanks much,

    -Steve




--------------050406010009090000050505--

Re: mod_dbd & mod_dbd_authn - mysql user authenticationproblems - apache 2.2.9

am 15.08.2008 22:32:57 von Steve Whitson

--------------070404070004020006000303
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Nick Kew wrote:
> On Fri, 15 Aug 2008 10:22:43 -0500
> Steve Whitson wrote:
>
>
>
>> The version of mysql apache is building against is 5.0.37. The
>> server I'm connecting (which should not be the issue) is 4.0.11a (I
>> hope to upgrade this year).
>>
>
> It probably is. The MySQL driver was originally written for MySQL 4.1,
> and uses SQL and API functions not available in 4.0.
>
> In other words, you have an unsupported version.
>
Connecting to a newer mysql server (also 5.0.37) works just great!
Yea!!! Thanks much!
-Steve

--------------070404070004020006000303
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit








Nick Kew wrote:


On Fri, 15 Aug 2008 10:22:43 -0500
Steve Whitson wrote:




The version of mysql apache is building against is 5.0.37.  The
server I'm connecting (which should not be the issue) is 4.0.11a (I
hope to upgrade this year).



It probably is. The MySQL driver was originally written for MySQL 4.1,
and uses SQL and API functions not available in 4.0.

In other words, you have an unsupported version.


Connecting to a newer mysql server (also 5.0.37) works just great! 
Yea!!!  Thanks much!

    -Steve




--------------070404070004020006000303--