Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

httpd 2.4.53 mod_dbd not compatible with APR in get_driver

107 views
Skip to first unread message

Lewis G Rosenthal

unread,
Aug 6, 2022, 2:15:02 AM8/6/22
to Apache2 Mailing List
Hi, again, Paul...

Okay, so now I've got a working 2.4.53/PHP8.1.8 stack running a clone of the
Arca Noae site. That's an accomplishment. :-)

The current thinking around the net (I believe) is that mod_auth_mysql has
been deprecated in favor of mod_authn_dbd and thus, mod_dbd. I've tried to
modify the previous mod_auth_mysql code to work with this, and I doubt I
have it right, however, I'm puzzled by the error mentioned in the subject
line, which is logged in the vhost error log. The complete error is:

[core:alert] [pid nnn:tid n] (OS 3)SYS0003: The system cannot find the path
specified. : AH00628: mod_dbd not compatible with APR in get_driver

(all one line, in case that wraps when posted)

I'm not sure what path cannot be found. The DBDriver directive for the vhost is:

DBDriver mysql
DBParams "dbname=<database> pass=<pass> host=<ipv4-addr>"

(obviously, the params are as they should be for the db in question on the
other server)

Should I turn up logging verbosity, perhaps, to see if we can get a bit more
of the "before that line" happenings?

--
Lewis
-------------------------------------------------------------
Lewis G Rosenthal, CNA, CLP, CLE, CWTS, EA
Rosenthal & Rosenthal, LLC www.2rosenthals.com
visit my IT blog www.2rosenthals.net/wordpress
-------------------------------------------------------------

Steven Levine

unread,
Aug 6, 2022, 3:10:14 AM8/6/22
to apa...@googlegroups.com
In <62EE06D9...@2rosenthals.com>, on 08/06/22
at 02:14 AM, Lewis G Rosenthal <lgros...@2rosenthals.com> said:

Hi all,

>[core:alert] [pid nnn:tid n] (OS 3)SYS0003: The system cannot find the
>path specified. : AH00628: mod_dbd not compatible with APR in get_driver

Looking at:

apr_dbd.c:186
#elif defined(WIN32) || defined(__CYGWIN__)
apr_snprintf(modname, sizeof(modname),
"apr_dbd_%s-" APU_STRINGIFY(APU_MAJOR_VERSION) ".dll",
name);

I suspect we could use a patch. The default will be to build modname with
a ".so" extension which should cause the apu_dso_load to fail.

>Should I turn up logging verbosity, perhaps, to see if we can get a bit
>more of the "before that line" happenings?

Let's see if Paul agrees with me.

Steven

--
----------------------------------------------------------------------
"Steven Levine" <ste...@earthlink.net> Warp/DIY/BlueLion etc.
www.scoug.com www.arcanoae.com www.warpcave.com
----------------------------------------------------------------------

Paul Smedley

unread,
Aug 6, 2022, 5:52:20 AM8/6/22
to apa...@googlegroups.com
Hey Guys,

On 6/8/22 16:32, Steven Levine wrote:
> In <62EE06D9...@2rosenthals.com>, on 08/06/22
> at 02:14 AM, Lewis G Rosenthal <lgros...@2rosenthals.com> said:
>
> Hi all,
>
>> [core:alert] [pid nnn:tid n] (OS 3)SYS0003: The system cannot find the
>> path specified. : AH00628: mod_dbd not compatible with APR in get_driver
>
> Looking at:
>
> apr_dbd.c:186
> #elif defined(WIN32) || defined(__CYGWIN__)
> apr_snprintf(modname, sizeof(modname),
> "apr_dbd_%s-" APU_STRINGIFY(APU_MAJOR_VERSION) ".dll",
> name);
>
> I suspect we could use a patch. The default will be to build modname with
> a ".so" extension which should cause the apu_dso_load to fail.
I did modify this code.

>> Should I turn up logging verbosity, perhaps, to see if we can get a bit
>> more of the "before that line" happenings?
>
> Let's see if Paul agrees with me.

The other (more major?) issue is that I was configuring apr-util with
'--disable-util-dso'

From configure:
--disable-util-dso disable DSO build of modular components
(crypto, dbd, dbm, ldap)


https://smedley.id.au/tmp/httpd-2.4.53-os2-debug-20220806.zip might help.

Cheers,

Paul

Lewis G Rosenthal

unread,
Aug 6, 2022, 7:51:45 PM8/6/22
to apa...@googlegroups.com
Hi, Paul...
This is still showing in the main error_log and the vhost log after the
upgrade to today's build.

To be clear, the main error_log has two entries per pid:tid error (failed to
initialize and child init failed), whereas the vhost error log lists the
module not compatible with APR in get_driver (one entry per pid:tid).

Paul Smedley

unread,
Aug 6, 2022, 8:46:53 PM8/6/22
to apa...@googlegroups.com
Hey Lewis,
I'll try configure this module later today so I can (hopefully) reproduce...

Cheers,

Paul

Paul Smedley

unread,
Aug 6, 2022, 9:29:45 PM8/6/22
to apa...@googlegroups.com
Hey again

On 7/8/22 09:21, Lewis G Rosenthal wrote:
The way I read
https://www.psychoticwolf.net/2008/07/apache-and-mysql-authentication/ -
it's likely a sign that we're missing apr_dbd_mysql-1.dll

I'll have to work out how to build apr_dbd_mysql-1 (and how to get apr
to find it as dbdmysql.dll

Cheers,

Paul

Steven Levine

unread,
Aug 6, 2022, 10:07:37 PM8/6/22
to apa...@googlegroups.com
In <c99972ce-f003-723d...@smedley.id.au>, on 08/07/22
at 10:59 AM, Paul Smedley <pa...@smedley.id.au> said:

Hi Paul,

>>>> Looking at:
>>>>
>>>> apr_dbd.c:186
>>>> #elif defined(WIN32) || defined(__CYGWIN__)
>>>>      apr_snprintf(modname, sizeof(modname),
>>>>                   "apr_dbd_%s-" APU_STRINGIFY(APU_MAJOR_VERSION) ".dll",
>>>> name);

>The way I read
>https://www.psychoticwolf.net/2008/07/apache-and-mysql-authentication/ -
>it's likely a sign that we're missing apr_dbd_mysql-1.dll

Agreed. That's how I read the code that I referenced. I figured you
would have to build it with an 8.3 name and add an #elif defined(__OS2__)
section to apr_snprintf the name you need into modname.

Paul Smedley

unread,
Aug 7, 2022, 1:34:46 AM8/7/22
to apa...@googlegroups.com
Hey guys,

On 7/8/22 11:31, Steven Levine wrote:
> In <c99972ce-f003-723d...@smedley.id.au>, on 08/07/22
> at 10:59 AM, Paul Smedley <pa...@smedley.id.au> said:
>
>>>>> Looking at:
>>>>>
>>>>> apr_dbd.c:186
>>>>> #elif defined(WIN32) || defined(__CYGWIN__)
>>>>>      apr_snprintf(modname, sizeof(modname),
>>>>>                   "apr_dbd_%s-" APU_STRINGIFY(APU_MAJOR_VERSION) ".dll",
>>>>> name);
>
>> The way I read
>> https://www.psychoticwolf.net/2008/07/apache-and-mysql-authentication/ -
>> it's likely a sign that we're missing apr_dbd_mysql-1.dll
>
> Agreed. That's how I read the code that I referenced. I figured you
> would have to build it with an 8.3 name and add an #elif defined(__OS2__)
> section to apr_snprintf the name you need into modname.

I must have been VERY distracted with uniaud when I looked at this
yesterday...

I thought I checked the output of apr-util configure to look for any
options for mysql and didn't see any...

Anyways, I had a proper look today, and I think I've enabled
apr-dbd-mysql successfully.

dbdmysql.dll is at
https://smedley.id.au/tmp/apr-dbd-mysql-1.6.1-os2-20220807.zip

An updated httpd is at
https://smedley.id.au/tmp/httpd-2.4.53-os2-debug-20220807.zip

fingers crossed this one works...

Cheers,

Paul

Steven Levine

unread,
Aug 7, 2022, 7:26:20 PM8/7/22
to apa...@googlegroups.com
In <d54d7560-187e-d9cf...@smedley.id.au>, on 08/07/22
at 03:04 PM, Paul Smedley <pa...@smedley.id.au> said:

Hi Paul,

>dbdmysql.dll is at
>https://smedley.id.au/tmp/apr-dbd-mysql-1.6.1-os2-20220807.zip

>An updated httpd is at
>https://smedley.id.au/tmp/httpd-2.4.53-os2-debug-20220807.zip

>fingers crossed this one works...

It's not working here yet for me. A quick test with:

LoadModule dbd_module modules/dbd.dll

and

<IfModule dbd_module>
DBDriver mysql
DBDParams host=localhost,dbname=mysql,user=root,pass=
</IfModule>

results in

[Sun Aug 07 16:02:58.503000 2022] [dbd:error] [pid 384:tid 1] (OS
3)SYS0003: The system cannot find the path specified. : AH00628: mod_dbd
not compatible with APR in get_driver [Sun Aug 07 16:02:58.503000 2022]
[dbd:error] [pid 384:tid 1] (OS 3)SYS0003: The system cannot find the path
specified. : AH00633: failed to initialise [Sun Aug 07 16:02:58.503000
2022] [dbd:crit] [pid 384:tid 1] (OS 3)SYS0003: The system cannot find the
path specified. : AH00636: child init failed!

If Lewis can confirm it's not my configuration, which my analysis says is
unlikely, and you would like me to crank up the debugger, please push your
commits to the httpd repo. It should be easy enough to see what is
failing.

Before this, it appears we are be missing an export. Notice that

dbd\apr_dbd.c:193
apr_snprintf(symname, sizeof(symname), "apr_dbd_%s_driver", name);
rv = apu_dso_load(NULL, &symbol, modname, symname, pool);

tells us that apr_dbd_mysql_driver should be exported by our dbdmysql.dll.

According to:

lxlite -c:exemap dbdmysql.dll

this is not happening:

Resident Names Table
Index Name
00000 dbdmysql

Lewis G Rosenthal

unread,
Aug 7, 2022, 7:49:32 PM8/7/22
to apa...@googlegroups.com
Hi, guys...
I don't see anything wrong with your configuration above. It resembles mine,
and I *think* it should work. In fact, I believe that we could comment the
DBDParams directive and get the same result (i.e., the error occurs when
attempting to load/find the DBD MySql driver).

> Before this, it appears we are be missing an export. Notice that
>
> dbd\apr_dbd.c:193
> apr_snprintf(symname, sizeof(symname), "apr_dbd_%s_driver", name);
> rv = apu_dso_load(NULL, &symbol, modname, symname, pool);
>
> tells us that apr_dbd_mysql_driver should be exported by our dbdmysql.dll.
>
> According to:
>
> lxlite -c:exemap dbdmysql.dll
>
> this is not happening:
>
> Resident Names Table
> Index Name
> 00000 dbdmysql
>

This all seems to flow with what we're seeing in the log, yes.

I'm at least an hour from being able to test locally, however, but I will
follow up.

Cheers

Paul Smedley

unread,
Aug 7, 2022, 8:17:48 PM8/7/22
to Apache OS/2
Hey guys,

Sounds like a build error on my part. I did create the def file, but now I reflect on it, I don't think I modified my build.cmd to *use* the def file {insert facepaln emoji}.


Fix incoming in 8 hours or so when I'm at home.

Cheers,

Paul

From: Steven Levine <ste...@earthlink.net>
Sent: Monday, 8 August 2022 08:30
To: apa...@googlegroups.com
Subject: Re: [Apache/2] httpd 2.4.53 mod_dbd not compatible with APR in get_driver

In <d54d7560-187e-d9cf-327...@smedley.id.au>, on 08/07/22
--
You received this message because you are subscribed to the Google Groups "Apache for OS/2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apache2+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/apache2/62f04404.4.mr2ice.fgrirsq%40earthlink.net.

From: Steven Levine <ste...@earthlink.net>
Sent: Monday, 8 August 2022 08:30
To: apa...@googlegroups.com
Subject: Re: [Apache/2] httpd 2.4.53 mod_dbd not compatible with APR in get_driver

In <d54d7560-187e-d9cf-327...@smedley.id.au>, on 08/07/22
--
You received this message because you are subscribed to the Google Groups "Apache for OS/2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apache2+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/apache2/62f04404.4.mr2ice.fgrirsq%40earthlink.net.

Lewis G Rosenthal

unread,
Aug 7, 2022, 9:17:31 PM8/7/22
to apa...@googlegroups.com
:-)

We forgive you.

Looks like I'll hold off testing a little while longer. No worries!

On 08/07/22 08:17 pm, Paul Smedley wrote:
> Hey guys,
>
> Sounds like a build error on my part. I did create the def file, but now I
> reflect on it, I don't think I modified my build.cmd to *use* the def file
> {insert facepaln emoji}.
>
> Looking at build CMD in
> https://github.com/psmedley/apr-util-os2/commit/3c2aa03bb728e268e9e5d0b99dcf93fe4000eb97 confirms
> this.
>
> Fix incoming in 8 hours or so when I'm at home.
>
> Cheers,
>
> Paul
> ----------------------------------------------------------------------------
> *From:* Steven Levine <ste...@earthlink.net>
> *Sent:* Monday, 8 August 2022 08:30
> *To:* apa...@googlegroups.com
> *Subject:* Re: [Apache/2] httpd 2.4.53 mod_dbd not compatible with APR in
> get_driver
>
> In <d54d7560-187e-d9cf...@smedley.id.au
> <mailto:-187e-d9cf-327...@smedley.id.au>>, on 08/07/22
> at 03:04 PM, Paul Smedley <pa...@smedley.id.au <mailto:pa...@smedley.id.au>>
> "Steven Levine" <ste...@earthlink.net <mailto:ste...@earthlink.net>>
> Warp/DIY/BlueLion etc.
> www.scoug.com www.arcanoae.com www.warpcave.com
> ----------------------------------------------------------------------
>
> --
> You received this message because you are subscribed to the Google Groups
> "Apache for OS/2" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to apache2+u...@googlegroups.com
> <mailto:apache2+u...@googlegroups.com>.
> ----------------------------------------------------------------------------
> *From:* Steven Levine <ste...@earthlink.net>
> *Sent:* Monday, 8 August 2022 08:30
> *To:* apa...@googlegroups.com
> *Subject:* Re: [Apache/2] httpd 2.4.53 mod_dbd not compatible with APR in
> get_driver
>
> In <d54d7560-187e-d9cf...@smedley.id.au
> <mailto:-187e-d9cf-327...@smedley.id.au>>, on 08/07/22
> at 03:04 PM, Paul Smedley <pa...@smedley.id.au
> "Steven Levine" <ste...@earthlink.net <mailto:ste...@earthlink.net>>
> Warp/DIY/BlueLion etc.
> www.scoug.com www.arcanoae.com www.warpcave.com
> ----------------------------------------------------------------------
>
> --
> You received this message because you are subscribed to the Google
> Groups "Apache for OS/2" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to apache2+u...@googlegroups.com
> <mailto:apache2+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/apache2/62f04404.4.mr2ice.fgrirsq%40earthlink.net.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Apache for OS/2" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to apache2+u...@googlegroups.com
> <mailto:apache2+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/apache2/357a4317-e430-457b-b016-053956080598%40smedley.id.au
> <https://groups.google.com/d/msgid/apache2/357a4317-e430-457b-b016-053956080598%40smedley.id.au?utm_medium=email&utm_source=footer>.
> --
> This email was Anti Virus checked by Astaro Security Gateway. http://www.sophos.com

Steven Levine

unread,
Aug 7, 2022, 10:53:07 PM8/7/22
to apa...@googlegroups.com
In <357a4317-e430-457b...@smedley.id.au>, on 08/08/22
at 09:47 AM, Paul Smedley <pa...@smedley.id.au> said:

Hi Paul,

>Fix incoming in 8 hours or so when I'm at home.

If you are going to use an underscore prefix, you might need to add one
here too:

dbd\apr_dbd.c:195
apr_snprintf(symname, sizeof(symname), "apr_dbd_%s_driver", name);

This is based on what you have pushed to github, so I can't tell if you
have already done this locally.

Paul Smedley

unread,
Aug 8, 2022, 4:08:42 AM8/8/22
to apa...@googlegroups.com

Hey Guys,
I'll try test locally a little later, but meanwhile:
https://smedley.id.au/tmp/apr-dbd-mysql-1.6.1-os2-20220808.zip
https://smedley.id.au/tmp/httpd-2.4.53-os2-debug-20220808.zip

Cheers,

Paul

Steven Levine

unread,
Aug 8, 2022, 11:11:27 PM8/8/22
to apa...@googlegroups.com
In <564ee4fa-cde3-2dc5...@smedley.id.au>, on 08/08/22
at 05:38 PM, Paul Smedley <pa...@smedley.id.au> said:

Hi all,
Looks right, but not yet working here. I'll crank up the the debugger in
a bit and see what there is to see.

Later...

The mapping is not quite right yet. With a breakpoint at:

dbd\apr_dbd.c:197
rv = apu_dso_load(NULL, &symbol, modname, symname, pool);

I see

modname = apr_dbd_mysql-1.dll
symname = apr_dbf_mysql_driver

apr_dbd.o is built without debug data, so it's hard to say exactly how
this happened.

Steven Levine

unread,
Aug 9, 2022, 12:21:31 AM8/9/22
to apa...@googlegroups.com
at 05:38 PM, Paul Smedley <pa...@smedley.id.au> said:

Hi all,

More...

Best I can tell, the code is built as if WIN32 was defined. Odd. Did we
simply not recompile apr_dbd.c after the commit?

Paul Smedley

unread,
Aug 9, 2022, 4:58:22 AM8/9/22
to apa...@googlegroups.com
Hey guys,

On 9/8/22 09:08, Steven Levine wrote:
> In <564ee4fa-cde3-2dc5...@smedley.id.au>, on 08/08/22
> at 05:38 PM, Paul Smedley <pa...@smedley.id.au> said:
>
> Hi all,
>
>> I'll try test locally a little later, but meanwhile:
>> https://smedley.id.au/tmp/apr-dbd-mysql-1.6.1-os2-20220808.zip
>> https://smedley.id.au/tmp/httpd-2.4.53-os2-debug-20220808.zip
>
> Looks right, but not yet working here. I'll crank up the the debugger in
> a bit and see what there is to see.
>
> Later...
>
> The mapping is not quite right yet. With a breakpoint at:
>
> dbd\apr_dbd.c:197
> rv = apu_dso_load(NULL, &symbol, modname, symname, pool);
>
> I see
>
> modname = apr_dbd_mysql-1.dll
> symname = apr_dbf_mysql_driver
>
> apr_dbd.o is built without debug data, so it's hard to say exactly how
> this happened.

https://smedley.id.au/tmp/httpd-2.4.53-os2-debug-20220809.zip will
hopefully do the trick.

Cheers,

Paul

David McKenna

unread,
Aug 9, 2022, 6:22:42 AM8/9/22
to Apache for OS/2
Hi Paul,

  While it seems to work OK, there are some new odd messages when I run this one. At startup:

AH00112: Warning: DocumentRoot [C:/apache24/docs/dummy-host.example.com] does no
t exist
AH00112: Warning: DocumentRoot [C:/apache24/docs/dummy-host2.example.com] does n
ot exist
Apache/2.4.53 (OS/2) OpenSSL/1.1.1q PHP/8.1.9

 Also, the log file names are different:

[C:\programs\apache24\logs]dir

The volume label in drive C is ARCAOS.
The Volume Serial Number is A0CC:05C2.
Directory of C:\programs\apache24\logs

 8-09-22  6:15a         <DIR>    694 a---  .
 8-09-22  6:12a         <DIR>     30 ----  ..
 8-09-22  6:16a        13,959      0 a---  access_log
 8-09-22  6:06a         8,325      0 a---  dummy-host.example.com-access_log
 8-09-22  6:06a        15,232      0 a---  dummy-host.example.com-error_log
 8-08-22  7:05a             0      0 ----  dummy-host2.example.com-access_log
 8-08-22  7:05a             0      0 ----  dummy-host2.example.com-error_log
 8-09-22  6:15a         3,376      0 a---  error_log
 8-09-22  6:15a             4      0 a---  httpd.pid
 8-09-22  6:16a        17,409      0 a---  ssl_request_log
       10 file(s)      58,305 bytes used
                   50,589,749 K bytes free

 Used to have a bunch of 'www.davemckenna.com' files listed where 'dummy-host.example.com' is now. DocumentRoot is definitely properly defined in httpd.conf...

Regards,

Steven Levine

unread,
Aug 9, 2022, 3:17:09 PM8/9/22
to apa...@googlegroups.com
In <15c2247d-7991-ea92...@smedley.id.au>, on 08/09/22
at 06:28 PM, Paul Smedley <pa...@smedley.id.au> said:

Hi Paul,
This can't work in general without a few more patches. We have

misc\apu_dso.c:134
/* Retrieve our path search list or prepare for a single search */
if ((apr_env_get(&pathlist, APR_DSOPATH, pool) != APR_SUCCESS)
|| (apr_filepath_list_split(&paths, pathlist, pool) !=
APR_SUCCESS))
paths = apr_array_make(pool, 1, sizeof(char*));

but since you have APR_DSOPATH configured as "BEGINLIBPATH" it's not found
in the environment. The code falls back to using APU_DSO_LIBDIR, but this
is configured specific to your system (i.e. /extras/lib/apr-util-1).

There are a couple of solutions for this. One is to configure APR_DSOPATH
to "APR_DSOPATH" which can be used with PassEnv. The other is to tweak
PassEnv to understand BEGINLIBPATH and friends.

With a copy of dbdmysql.dll in /extras/lib/apr-util-1, the DLL can be
loaded, but apr_dso_sym is still failing. More on this later maybe.

Steven Levine

unread,
Aug 9, 2022, 3:28:30 PM8/9/22
to apa...@googlegroups.com
In <061ddf26-3283-422e...@googlegroups.com>, on 08/09/22
at 03:22 AM, David McKenna <davidmc...@gmail.com> said:

Hi David,

>AH00112: Warning: DocumentRoot [C:/apache24/docs/dummy-host.example.com]
>does no
>t exist
>AH00112: Warning: DocumentRoot [C:/apache24/docs/dummy-host2.example.com]
> does n
>ot exist
>Apache/2.4.53 (OS/2) OpenSSL/1.1.1q PHP/8.1.9

I'm not seeing this here. I think the report is coming from:

server\core.c:1618
if (apr_filepath_merge((char**)&conf->ap_document_root, NULL, arg,
APR_FILEPATH_TRUENAME, cmd->pool) !=
APR_SUCCESS
|| !ap_is_directory(cmd->temp_pool, arg)) {
if (cmd->server->is_virtual) {
ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0,
cmd->pool, APLOGNO(00112)
"Warning: DocumentRoot [%s] does not exist",
arg);
conf->ap_document_root = arg;
}
else {
return apr_psprintf(cmd->pool,
"DocumentRoot '%s' is not a directory, or
is not readable",
arg);
}
}

This means that message is related to one of your virtualhost
configurations.

dummy-host.example.com is referenced in the sample confs that Paul ships.

What does

httpd -d.. -t

have to report?

Steven Levine

unread,
Aug 9, 2022, 3:38:28 PM8/9/22
to apa...@googlegroups.com
at 06:28 PM, Paul Smedley <pa...@smedley.id.au> said:

Hi Paul,

I've not stepped though the code to see if you are currently buiding with
__INNOTEK_LIBC__ defined. If so, the apr_dso_sym failure is probably
because:

dso.c:94
#if defined(__INNOTEK_LIBC__)
void *retval;
char *symbol = (char*)malloc(sizeof(char)*(strlen(symname)+2));
sprintf(symbol, "_%s", symname);
rc = DosQueryProcAddr(handle->handle, 0, symbol, &func);
free(symbol);
#else
rc = DosQueryProcAddr(handle->handle, 0, symname, &func); #endif

which may give us an extra underscore prefix.

More later when I have some time for the debugger.

Steven Levine

unread,
Aug 9, 2022, 3:47:34 PM8/9/22
to apa...@googlegroups.com
at 06:28 PM, Paul Smedley <pa...@smedley.id.au> said:

Hi Paul,

OK, I can be so dumb. I already had the debugger right after the failing
call. It was trival to look and see that you are indeed buiding with
__INNOTEK_LIBC__ defined and that the code stuffed an extra underscore.

I guess the best solution is to drop the underscore in apr_dbd_get_driver
and remember that we always need to supply them when build export lists.

David McKenna

unread,
Aug 9, 2022, 4:19:30 PM8/9/22
to Apache for OS/2
Hi Steven,

"This means that message is related to one of your virtualhost
configurations.

dummy-host.example.com is referenced in the sample confs that Paul ships."

 D'oh! Somehow my httpd-vhosts.conf was not copied back when I updated to this build. It's all good now, thanks.

Regards,

Paul Smedley

unread,
Aug 9, 2022, 4:43:23 PM8/9/22
to apa...@googlegroups.com
Hey Steven,

On 10/8/22 05:12, Steven Levine wrote:
> In <15c2247d-7991-ea92...@smedley.id.au>, on 08/09/22
> at 06:28 PM, Paul Smedley <pa...@smedley.id.au> said:
>
> I guess the best solution is to drop the underscore in apr_dbd_get_driver
> and remember that we always need to supply them when build export lists.

https://smedley.id.au/tmp/httpd.zip has this and APR_DSOPATH defined to
"APR_DSOPATH"

Off to work now :)

Cheers,

Paul

Steven Levine

unread,
Aug 9, 2022, 11:52:02 PM8/9/22
to apa...@googlegroups.com
In <cda1bfed-aab5-d9cb...@smedley.id.au>, on 08/10/22
at 06:13 AM, Paul Smedley <pa...@smedley.id.au> said:

Hi,

>https://smedley.id.au/tmp/httpd.zip has this and APR_DSOPATH defined to
>"APR_DSOPATH"

We are getting very close:

[Tue Aug 09 20:39:04.047000 2022] [mpm_mpmt_os2:info] [pid 1920:tid 1]
AH00207: Server built: Aug 9 2022 18:22:22 [Tue Aug 09 20:39:04.217000
2022] [dbd:error] [pid 1921:tid 1] (20014)Internal error (specific
information not available): AH00629: Can't connect to mysql: Can't connect
to local MySQL server through socket '\\socket\\mysql' (49) [Tue Aug 09
20:39:04.233000 2022] [dbd:error] [pid 1921:tid 1] (20014)Internal error
(specific information not available): AH00633: failed to initialise [Tue
Aug 09 20:39:04.233000 2022] [dbd:crit] [pid 1921:tid 1] (20014)Internal
error (specific information not available): AH00636: child init failed!

This is with:

<IfModule dbd_module>
PassEnv APR_DSOPATH
DBDriver mysql
DBDParams host=localhost,dbname=mysql,user=root,pass=
</IfModule>

I need to figure out how to tweak DBParams to not try to use
\\socket\mysql, which IIRC, we don't support.

>Off to work now :)

Hi ho. Hi ho.

Paul Smedley

unread,
Aug 10, 2022, 5:41:58 AM8/10/22
to apa...@googlegroups.com
Hi Steven,

On 10/8/22 13:10, Steven Levine wrote:
> In <cda1bfed-aab5-d9cb...@smedley.id.au>, on 08/10/22
> at 06:13 AM, Paul Smedley <pa...@smedley.id.au> said:
>
> Hi,
>
>> https://smedley.id.au/tmp/httpd.zip has this and APR_DSOPATH defined to
>> "APR_DSOPATH"
>
> We are getting very close:
>
> [Tue Aug 09 20:39:04.047000 2022] [mpm_mpmt_os2:info] [pid 1920:tid 1]
> AH00207: Server built: Aug 9 2022 18:22:22 [Tue Aug 09 20:39:04.217000
> 2022] [dbd:error] [pid 1921:tid 1] (20014)Internal error (specific
> information not available): AH00629: Can't connect to mysql: Can't connect
> to local MySQL server through socket '\\socket\\mysql' (49) [Tue Aug 09
> 20:39:04.233000 2022] [dbd:error] [pid 1921:tid 1] (20014)Internal error
> (specific information not available): AH00633: failed to initialise [Tue
> Aug 09 20:39:04.233000 2022] [dbd:crit] [pid 1921:tid 1] (20014)Internal
> error (specific information not available): AH00636: child init failed!
>
> This is with:
>
> <IfModule dbd_module>
> PassEnv APR_DSOPATH
> DBDriver mysql
> DBDParams host=localhost,dbname=mysql,user=root,pass=
> </IfModule>
>
> I need to figure out how to tweak DBParams to not try to use
> \\socket\mysql, which IIRC, we don't support.
The above config with an appropriate value for pass seems to load ok
here - I haven't tried a query yet though. Note I'm running mysql server
5.6.x

>> Off to work now :)
>
> Hi ho. Hi ho.

:)

Cheers,

Paul

Lewis

unread,
Sep 22, 2022, 10:18:02 PM9/22/22
to apa...@googlegroups.com
Hi, Paul...
I seem to be getting further, but still no joy (this with httpd.dll dated
2022-08-09):

DBDriver mysql
DBDParams "host=nnn.nnn.nnn.nnn,dbname=name,user=user,pass=pass"

and the proper (I think) lines for basic auth, I do get the login prompt,
but after entering credentials, I immediately get another prompt. This is
due to:

[dbd:error] [pid nnn:tid 1] (OS 3)SYS0003: The system cannot find the path
specified. : AH00633: failed to initialise
[dbd:crit] [pid nnn:tid 1] (OS 3)SYS0003: The system cannot find the path
specified. : AH00636: child init failed!

I'm just not sure which path could not be found. The conf specifies a dummy
password file:

AuthUserFile j:/apps/apache24/passwords/dummy.pass

The path exists and the file is 0-length. This file should not even be used,
however, as the authentication should be against the MySQL db. I could trace
the IP to see if the db connection is actually being attempted, but I don't
think we're getting that far (the nnn.nnn.nnn.nnn above is non-local).

--
Lewis

Paul Smedley

unread,
Sep 23, 2022, 1:06:03 AM9/23/22
to apa...@googlegroups.com
Hey Lewis,
Those errors seem to come from
https://github.com/psmedley/httpd-2.4-os2/blob/main/modules/database/mod_dbd.c#L652
and
https://github.com/psmedley/httpd-2.4-os2/blob/main/modules/database/mod_dbd.c#L709

From a quick look, I can't see where that error is coming from either....


Paul Smedley

unread,
Sep 23, 2022, 1:09:21 AM9/23/22
to apa...@googlegroups.com
Hey again,
I'm going to work through this
(https://www.howtoforge.com/tutorial/password-protect-directories-with-mod_authn_dbd-mysql-on-apache-debian-jessie/)
a bit later on when my head is clearer - woke up today with a massive
headache.. :(

Paul Smedley

unread,
Sep 23, 2022, 4:54:50 AM9/23/22
to apa...@googlegroups.com

Hey Lewis,

Proper response now that I've done some local testing.

I roughly followed the guide at
https://www.rapid7.com/blog/post/2017/10/04/how-to-password-protect-apache-directories-with-mod_authn_dbd-and-mysql-on-ubuntu-linux/

On 23/9/22 11:47, Lewis wrote:
my testing is with http://smedley.id.au/tmp/httpd.zip

> DBDriver mysql
> DBDParams "host=nnn.nnn.nnn.nnn,dbname=name,user=user,pass=pass"
>
> and the proper (I think) lines for basic auth, I do get the login
> prompt, but after entering credentials, I immediately get another
> prompt. This is due to:
>
> [dbd:error] [pid nnn:tid 1] (OS 3)SYS0003: The system cannot find the
> path specified. : AH00633: failed to initialise
> [dbd:crit] [pid nnn:tid 1] (OS 3)SYS0003: The system cannot find the
> path specified. : AH00636: child init failed!
>
> I'm just not sure which path could not be found. The conf specifies a
> dummy password file:
>
> AuthUserFile j:/apps/apache24/passwords/dummy.pass
>
> The path exists and the file is 0-length. This file should not even be
> used, however, as the authentication should be against the MySQL db. I
> could trace the IP to see if the db connection is actually being
> attempted, but I don't think we're getting that far (the nnn.nnn.nnn.nnn
> above is non-local).

The config I used was:
<IfModule dbd_module>
PassEnv APR_DSOPATH
DBDriver mysql
DBDParams "host=localhost,dbname=defaultsite_db user=site_admin
pass=password"

DBDMin 4
DBDKeep 8
DBDMax 20
DBDExptime 300

<Directory "/web/protectedsite">
# mod_authn_core and mod_auth_basic configuration
# for mod_authn_dbd
AuthType Basic
AuthName "My Server"
AuthBasicProvider dbd

# mod_authz_core configuration
Require valid-user

# mod_authn_dbd SQL query to authenticate a user
AuthDBDUserPWQuery "SELECT passwd FROM mysql_auth WHERE username = %s"
</Directory>
</IfModule>

Dumb question - you do have a copy of dbdmysql.dll in your modules dir?
I'm using https://smedley.id.au/tmp/apr-dbd-mysql-1.6.1-os2-20220810.zip

Cheers,

Paul

Paul Smedley

unread,
Sep 23, 2022, 5:06:46 AM9/23/22
to apa...@googlegroups.com
Me again,

I just noticed I have:
set APR_DSOPATH=e:\apache24\modules

in my startup.cmd - this might help dbd.dll find dbdmysql.dll

Cheers,

Paul

Lewis G Rosenthal

unread,
Sep 23, 2022, 11:02:35 AM9/23/22
to apa...@googlegroups.com
Hope your headache is better...
Interesting that you didn't wrap Require valid-user in <RequireAll> tags.

Meanwhile, while I *was* missing the dbdmysql module (D'Oh!), what did the
trick to get it found was the addition of APR_DSOPATH.

Now, I have no more noise in the log, but I'm not authenticating. The vhost
log is telling me that my user account cannot be found. So, either my db
params for the lookup are incorrect (most likely, as this is not a password
hash failure) or the lookup is not actually happening, and basic auth is
trying to locate my account in the dummy (empty) passwd file. I'll have to
look more closely, and will follow up.

Thanks

Steven Levine

unread,
Sep 23, 2022, 11:08:51 AM9/23/22
to apa...@googlegroups.com
In <9d62aab7-251f-05c6...@smedley.id.au>, on 09/23/22
at 06:36 PM, Paul Smedley <pa...@smedley.id.au> said:

HI all,

I have returned from the land of the unhoused - the termite tenting in
done. Now all that's left to do is to get resettled and caught up.

>I just noticed I have:
>set APR_DSOPATH=e:\apache24\modules

This is required because apr-util does

misc\apu_dso.c:134
/* Retrieve our path search list or prepare for a single search */
if ((apr_env_get(&pathlist, APR_DSOPATH, pool) != APR_SUCCESS)
|| (apr_filepath_list_split(&paths, pathlist, pool) !=
APR_SUCCESS))
paths = apr_array_make(pool, 1, sizeof(char*));

Without this the search path used by

misc\apu_dso.c:146
for (i = 0; i < paths->nelts; ++i)

will be emtpy.

Lewis

unread,
Sep 23, 2022, 11:26:39 AM9/23/22
to apa...@googlegroups.com
On 09/23/22 11:03 am, Steven Levine wrote:
> In <9d62aab7-251f-05c6...@smedley.id.au>, on 09/23/22
> at 06:36 PM, Paul Smedley <pa...@smedley.id.au> said:
>
> HI all,
>
> I have returned from the land of the unhoused - the termite tenting in
> done. Now all that's left to do is to get resettled and caught up.
>
>> I just noticed I have:
>> set APR_DSOPATH=e:\apache24\modules
> This is required because apr-util does
>
> misc\apu_dso.c:134
> /* Retrieve our path search list or prepare for a single search */
> if ((apr_env_get(&pathlist, APR_DSOPATH, pool) != APR_SUCCESS)
> || (apr_filepath_list_split(&paths, pathlist, pool) !=
> APR_SUCCESS))
> paths = apr_array_make(pool, 1, sizeof(char*));
>
> Without this the search path used by
>
> misc\apu_dso.c:146
> for (i = 0; i < paths->nelts; ++i)
>
> will be emtpy.
>

I would suggest that a sane modification would be to fall back to libpath,
but that's just me. :-)

I've identified what may be the cause of my authentication failure
(surprise: configuration error), and will be spending some quality time with
that today. I'm currently stuck on the proper string for:

AuthBasicProvider

as dbd (which I thought was logical) seems to fail (Apache will not start,
complaining of an unknown Authn provider, even though authndbd.dll is
present in modules).

--
Lewis

Steven Levine

unread,
Sep 23, 2022, 12:35:17 PM9/23/22
to apa...@googlegroups.com
In <632DD028...@2rosenthals.com>, on 09/23/22
at 11:26 AM, Lewis <lgros...@2rosenthals.com> said:

Hi,

>I would suggest that a sane modification would be to fall back to
>libpath, but that's just me. :-)

Submit a ticket. :-)

>as dbd (which I thought was logical) seems to fail (Apache will not
>start, complaining of an unknown Authn provider, even though
>authndbd.dll is present in modules).

Are you sure everything needed is also loaded with LoadModule?

I suspect your error message is from:

modules\aaa\mod_auth_basic.c:101
if (newp->provider == NULL) {
/* by the time they use it, the provider should be loaded and
registered with us. */
return apr_psprintf(cmd->pool,
"Unknown Authn provider: %s",
newp->provider_name);
}

This occurs because ap_lookup_provider fails. However, ap_lookup_provider
has nothing to do with module loading. It only checks that the module is
already registered as loaded. The registration is done by the provider
when it is loaded. In this case:

mod_authn_dbd.c:292
ap_register_auth_provider(p, AUTHN_PROVIDER_GROUP, "dbd",
AUTHN_PROVIDER_VERSION,
&authn_dbd_provider,
AP_AUTH_INTERNAL_PER_CONF);

Lewis G Rosenthal

unread,
Sep 23, 2022, 3:52:52 PM9/23/22
to apa...@googlegroups.com
Hi...

On 09/23/22 12:10 pm, Steven Levine wrote:
> In <632DD028...@2rosenthals.com>, on 09/23/22
> at 11:26 AM, Lewis <lgros...@2rosenthals.com> said:
>
> Hi,
>
>> I would suggest that a sane modification would be to fall back to
>> libpath, but that's just me. :-)
> Submit a ticket. :-)

Added to my to-do list.

>> as dbd (which I thought was logical) seems to fail (Apache will not
>> start, complaining of an unknown Authn provider, even though
>> authndbd.dll is present in modules).
> Are you sure everything needed is also loaded with LoadModule?
>

No, I'm not, simply because I'm still getting my feet wet with these auth
changes in 2.4.

What I do have loaded are:

authnile
authndbd
authnore
authzhost
authzdbm
authzdbd
authzore
accespat
auth_sic
socacdbm
dbd
reqtiout
include
filter
deflate
mime
log_cfig
env
expires
headers
setenvif
proxy
proxyect
proxyftp
proxyttp
proxyajp
proxycer
slotmshm
ssl
dav
status
autoindex
asis
ufo
cgi
negotion
dir
actions
userdir
alias
rewrite

Because of the server configuration, server-status isn't getting me where I
want to go (WordPress snags the URI and sends me a custom 404). I suspect
I'll get the same from server-info...checking...yes. I'll need to
reconfigure to keep that from happinging so I can see what Apache has
actually loaded.

> I suspect your error message is from:
>
> modules\aaa\mod_auth_basic.c:101
> if (newp->provider == NULL) {
> /* by the time they use it, the provider should be loaded and
> registered with us. */
> return apr_psprintf(cmd->pool,
> "Unknown Authn provider: %s",
> newp->provider_name);
> }
>
> This occurs because ap_lookup_provider fails. However, ap_lookup_provider
> has nothing to do with module loading. It only checks that the module is
> already registered as loaded. The registration is done by the provider
> when it is loaded. In this case:
>
> mod_authn_dbd.c:292
> ap_register_auth_provider(p, AUTHN_PROVIDER_GROUP, "dbd",
> AUTHN_PROVIDER_VERSION,
> &authn_dbd_provider,
> AP_AUTH_INTERNAL_PER_CONF);
>

This all makes sense. I would expect a string of "dbd" to satisfy this, and
as mysql has already been specified above this as the DBDriver, that
everything should be a go. Now, if the lookup fails, that's a different
matter, but as I say, it surely doesn't seem that we're even getting far
enough for a lookup to occur.

More to do over here.

Paul Smedley

unread,
Sep 23, 2022, 5:39:07 PM9/23/22
to apa...@googlegroups.com

Hey Guys,

On 24/9/22 00:56, Lewis wrote:
> On 09/23/22 11:03 am, Steven Levine wrote:
>> In <9d62aab7-251f-05c6...@smedley.id.au>, on 09/23/22
>>     at 06:36 PM, Paul Smedley <pa...@smedley.id.au> said:
>>
>> HI all,
>>
>> I have returned from the land of the unhoused - the termite tenting in
>> done.  Now all that's left to do is to get resettled and caught up.
>>
>>> I just noticed I have:
>>> set APR_DSOPATH=e:\apache24\modules
>> This is required because apr-util does
>>
>> misc\apu_dso.c:134
>>      /* Retrieve our path search list or prepare for a single search */
>>      if ((apr_env_get(&pathlist, APR_DSOPATH, pool) != APR_SUCCESS)
>>            || (apr_filepath_list_split(&paths, pathlist, pool) !=
>> APR_SUCCESS))
>>          paths = apr_array_make(pool, 1, sizeof(char*));
>>
>> Without this the search path used by
>>
>> misc\apu_dso.c:146
>>      for (i = 0; i < paths->nelts; ++i)
>>
>> will be emtpy.
>>
>
> I would suggest that a sane modification would be to fall back to
> libpath, but that's just me. :-)
Agree - and I'll work on this.

> I've identified what may be the cause of my authentication failure
> (surprise: configuration error), and will be spending some quality time
> with that today. I'm currently stuck on the proper string for:
>
> AuthBasicProvider
>
> as dbd (which I thought was logical) seems to fail (Apache will not
> start, complaining of an unknown Authn provider, even though
> authndbd.dll is present in modules).
>
From an auth POV, in my working setup, all I had is:
LoadModule authn_dbd_module modules/authndbd.dll
LoadModule authn_core_module modules/authnore.dll

I didn't have AuthBasicProvider set at all

Paul Smedley

unread,
Sep 23, 2022, 5:42:47 PM9/23/22
to apa...@googlegroups.com

Hey Steven,

On 24/9/22 00:33, Steven Levine wrote:
> In <9d62aab7-251f-05c6...@smedley.id.au>, on 09/23/22
> at 06:36 PM, Paul Smedley <pa...@smedley.id.au> said:
>
> HI all,
>
> I have returned from the land of the unhoused - the termite tenting in
> done. Now all that's left to do is to get resettled and caught up.
>
>> I just noticed I have:
>> set APR_DSOPATH=e:\apache24\modules
>
> This is required because apr-util does
>
> misc\apu_dso.c:134
> /* Retrieve our path search list or prepare for a single search */
> if ((apr_env_get(&pathlist, APR_DSOPATH, pool) != APR_SUCCESS)
> || (apr_filepath_list_split(&paths, pathlist, pool) !=
> APR_SUCCESS))
> paths = apr_array_make(pool, 1, sizeof(char*));
>
> Without this the search path used by
>
> misc\apu_dso.c:146
> for (i = 0; i < paths->nelts; ++i)
>
> will be emtpy.

dumb question time.....

Reading the docs for DosLoadModule - the examples show DLLs being loaded
with a path.

If a path isn't specified, does the path specified in LIBPATH then get used?

Or said in another way - what triggers DosLoadModule to attempt to use
the library path specified in LIBPATH?

Cheers,

Paul

Paul Smedley

unread,
Sep 23, 2022, 5:47:11 PM9/23/22
to apa...@googlegroups.com
Hi all,
Replying to my own post.....

From: http://www.edm2.com/os2api/Dos/DosLoadModule.html

"pszModuleName MUST NOT contain the .DLL extension if the DLL is to be
loaded from the LIBPATH. On the other hand, if the DLL has to be loaded
from a specific directory (i.e. not from the LIBPATH) then the .DLL
extension is needed."

So just trying to load "dbdmysql" with no path and no extension should
trigger the use of libpath?

Cheers,

Paul


Lewis G Rosenthal

unread,
Sep 23, 2022, 6:06:46 PM9/23/22
to apa...@googlegroups.com
Hey, Paul...
Indeed, I know I have more loaded than necessary. I started with what I had
for Apache 2.2, which was inherited from Hawking, where we've used all sorts
of stuff over the years which we probably are not using anymore. I should
trim the list.

I think your list above is complete, as dbd*.dll "modules" don't get listed
as traditional modules in *.conf.

I'll try taking out AuthBasicProvider, but the docs for mod_authn_dbd seem
to indicate that it is necessary.

Paul Smedley

unread,
Sep 23, 2022, 6:08:30 PM9/23/22
to apa...@googlegroups.com
Hey Lewis,
Duh....

I do have:
AuthBasicProvider dbd

Per my posted config....

Cheers,

Paul

Steven Levine

unread,
Sep 23, 2022, 6:35:06 PM9/23/22
to apa...@googlegroups.com
In <0a4cbb8b-5a09-dc6a...@smedley.id.au>, on 09/24/22
at 07:08 AM, Paul Smedley <pa...@smedley.id.au> said:

Hi all,

A few responses before I am off to do errands...

>I didn't have AuthBasicProvider set at all

See:

https://httpd.apache.org/docs/2.4/mod/mod_auth_basic.html#authbasicprovider

The default is AuthBasicProvider file.

Steven Levine

unread,
Sep 23, 2022, 7:31:27 PM9/23/22
to apa...@googlegroups.com
In <68208655-10f3-9568...@smedley.id.au>, on 09/24/22
at 07:17 AM, Paul Smedley <pa...@smedley.id.au> said:

Hi,

>From: http://www.edm2.com/os2api/Dos/DosLoadModule.html

>"pszModuleName MUST NOT contain the .DLL extension if the DLL is to be
>loaded from the LIBPATH. On the other hand, if the DLL has to be loaded
>from a specific directory (i.e. not from the LIBPATH) then the .DLL
>extension is needed."

This does not quite match my understanding. See:

https://www.os2world.com/forum/index.php/topic,2037.0.html

When loading by module name (i.e. no extension), LIBPATH is checked first.
When loading by file name (i.e. with extension and without path) LIBPATH
will be checked, but possibly not first.

When loading by file name, the case of the extension matters. A .DLL
exension will be stripped, effecitively treating it as a module name.

>So just trying to load "dbdmysql" with no path and no extension should
>trigger the use of libpath?

Yes. So should dbdmysql.DLL

Steven Levine

unread,
Sep 23, 2022, 7:56:22 PM9/23/22
to apa...@googlegroups.com
In <65e48474-2661-1961...@smedley.id.au>, on 09/24/22
at 07:12 AM, Paul Smedley <pa...@smedley.id.au> said:

Hi Paul,

>Reading the docs for DosLoadModule - the examples show DLLs being loaded
>with a path.

It's not the best of examples if one wants to describe typical use cases.
:-)

>If a path isn't specified, does the path specified in LIBPATH then get
>used?

Yes, with some caveats.

>Or said in another way - what triggers DosLoadModule to attempt to use
>the library path specified in LIBPATH?

LIBPATH is going to be seached whenever there is no drive or path
component in the passed module name.

See the CPG&R DosLoadModules - Parameters help panel discussion of the
pszModName parameter.

BTW, the case of the optional .DLL extension does not matter. I missed
the part were the working module name gets uppercased before the .DLL
extension gets stripped.

Paul Smedley

unread,
Sep 23, 2022, 8:15:11 PM9/23/22
to apa...@googlegroups.com
Hey Guys,

On 24/9/22 09:02, Steven Levine wrote:
> In <65e48474-2661-1961...@smedley.id.au>, on 09/24/22
> at 07:12 AM, Paul Smedley <pa...@smedley.id.au> said:
>
> Hi Paul,
>
>> Reading the docs for DosLoadModule - the examples show DLLs being loaded
>> with a path.
>
> It's not the best of examples if one wants to describe typical use cases.
> :-)
>
>> If a path isn't specified, does the path specified in LIBPATH then get
>> used?
>
> Yes, with some caveats.
>
>> Or said in another way - what triggers DosLoadModule to attempt to use
>> the library path specified in LIBPATH?
>
> LIBPATH is going to be seached whenever there is no drive or path
> component in the passed module name.
>
> See the CPG&R DosLoadModules - Parameters help panel discussion of the
> pszModName parameter.
>
> BTW, the case of the optional .DLL extension does not matter. I missed
> the part were the working module name gets uppercased before the .DLL
> extension gets stripped.

You're 100% correct.
https://smedley.id.au/tmp/httpd-dll-debug-20220924.zip now searches the
libpath. Changes to apr-util are in
https://github.com/psmedley/apr-util-os2/commit/6b12eac29694b5ce829f4abf82964ef2027b721e

This was even easier than expected, as we could recycle the WIN32 code :)

Cheers,

Paul

Lewis G Rosenthal

unread,
Sep 24, 2022, 12:00:32 AM9/24/22
to apa...@googlegroups.com
Hi, again...
Okay! No more APR_DSOPATH in my startup, but I've never been quite so happy
to get a password failure before. :-)

I think the issue now is how to properly match the hash from WordPress. Oh,
and also, I had to swap:

AuthDBDUserPWQuery

for

AuthDBDUserRealmQuery

with the same SQL in order to satisfy things, as I was getting:

AH01659: No AuthDBDUserRealmQuery has been specified

in the vhost error log. Go figure.

Anyway, some sources suggest telling Apache to hash the password given for
comparison, as in:

SELECT CONCAT('{MD5}',password) as password FROM...

but this doesn't seem to do it for me, either. I've cranked up the error
logging verbosity, but still not seeing it.

Anyway, from what I can tell right now, Apache is functioning as it should,
so this is down to a problem for me to solve locally.

Thanks, Paul!

Steven Levine

unread,
Sep 24, 2022, 12:22:00 AM9/24/22
to apa...@googlegroups.com
In <632E0E8A...@2rosenthals.com>, on 09/23/22
at 03:52 PM, Lewis G Rosenthal <lgros...@2rosenthals.com> said:

Hi,

>Because of the server configuration, server-status isn't getting me where
>I want to go (WordPress snags the URI and sends me a custom 404). I
>suspect I'll get the same from server-info...checking...yes. I'll need
>to reconfigure to keep that from happinging so I can see what Apache has
> actually loaded.

Try

httpd -d.. -t -D DUMP_MODULES |& less

It might provide some clues.

>This all makes sense. I would expect a string of "dbd" to satisfy this,
>and as mysql has already been specified above this as the DBDriver, that
> everything should be a go. Now, if the lookup fails, that's a different
>matter, but as I say, it surely doesn't seem that we're even getting far
>enough for a lookup to occur.

If

httpd -d.. -t

fails, it would seem so.

Steven Levine

unread,
Sep 24, 2022, 1:06:36 AM9/24/22
to apa...@googlegroups.com
In <632E80DB...@2rosenthals.com>, on 09/24/22
at 12:00 AM, Lewis G Rosenthal <lgros...@2rosenthals.com> said:

Hi,

>Okay! No more APR_DSOPATH in my startup, but I've never been quite so
>happy to get a password failure before. :-)

>I think the issue now is how to properly match the hash from WordPress.
>Oh, and also, I had to swap:

>AuthDBDUserRealmQuery

There's probably a reason the provider is implemented that way, but I
don't know what it is.

>Anyway, some sources suggest telling Apache to hash the password given
>for comparison, as in:

>SELECT CONCAT('{MD5}',password) as password FROM...

Take a look at

apr_passwd.c:82
APU_DECLARE(apr_status_t) apr_password_validate(const char *passwd,

This should give you an idea of what hash methods are supported.

Lewis G Rosenthal

unread,
Sep 24, 2022, 1:45:42 AM9/24/22
to apa...@googlegroups.com
Hi...

On 09/24/22 12:52 am, Steven Levine wrote:
> In <632E80DB...@2rosenthals.com>, on 09/24/22
> at 12:00 AM, Lewis G Rosenthal <lgros...@2rosenthals.com> said:
>
> Hi,
>
>> Okay! No more APR_DSOPATH in my startup, but I've never been quite so
>> happy to get a password failure before. :-)
>> I think the issue now is how to properly match the hash from WordPress.
>> Oh, and also, I had to swap:
>> AuthDBDUserRealmQuery
> There's probably a reason the provider is implemented that way, but I
> don't know what it is.

It's interesting. The difference between:

AuthDBDUserPWQuery

and

AuthDBDUserRealmQuery

is that in the latter case, the username and the realm are generally ANDed
in the query (...WHERE username = %s AND realm = %s) and "realm" is taken
from AuthName. Leaving the AND in the query results in the expected auth
failure. Quite odd, indeed. Omitting the AND clause sends what should be the
proper query, though I'm 99% sure the password hash is not right.

>> Anyway, some sources suggest telling Apache to hash the password given
>> for comparison, as in:
>> SELECT CONCAT('{MD5}',password) as password FROM...
> Take a look at
>
> apr_passwd.c:82
> APU_DECLARE(apr_status_t) apr_password_validate(const char *passwd,
>
> This should give you an idea of what hash methods are supported.
>

By {MD5} above, I actually should have said $apr1$. However, this doesn't
seem to get it.

As we know, WordPress uses PHPass. This was the entire reason for the
patched mod_auth_mysql which we use with Apache 2.2. Apache by default
doesn't handle PHPass.

More:

https://barry.blog/2008/05/19/mod_auth_mysql-and-phpass/

I need to do some more sleuthing to find out whether the WordPress upgrade
to 6.x from 4.9 might use something newer (bcrypt?) as well as recognize and
accept the existing hashes in the db (can't very well re-hash them, as that
would imply going backwards to the clear text and hashing again). For now,
though, I'd say this is a non-starter in thi configuration, so I'll have to
find an alternative.
Reply all
Reply to author
Forward
0 new messages