DBDPersist Off in vhost causes startup error log entries

DBDPersist Off in vhost causes startup error log entries

am 17.08.2009 02:48:06 von Peter Horn

Hi All,
I've been running Apache 2.2.9 / PHP 5.2.6 / Win XP SP3 with 3 named
vhosts for about a year with no real problems. Recently I added a fourth
vhost to run a Drupal site. This involved adding mySQL, and it all
worked after the usual few setup iterations. After the site was running
happily for a couple of weeks, I revisited the setup and removed
'DBDPersist Off' from the vhost. After I did this, I get the following
messages in the error log at startup, even though the site subsequently
appears to work correctly and there are no 'runtime' errors:

[Sat Aug 15 12:25:22 2009] [error] (OS 126)The specified module could
not be found. : DBD: mod_dbd not compatible with APR in get_driver
[Sat Aug 15 12:25:22 2009] [error] (OS 126)The specified module could
not be found. : DBD: failed to initialise

Other relevant information:

[amongst LoadModule's in httpd.conf]
LoadModule dbd_module modules/mod_dbd.so

[vhost section from httpd.conf, sanitised]

DocumentRoot "C:/path/examplesite"
ServerName example.org
ServerAlias anotherexample.org
CustomLog "logs/examplesite.log" myformat
DBDriver mysql
DBDParams "user=exampleuser, dbname=examplesite, pass=examplepassword"
# removing the next line causes startup errors
DBDPersist Off
# allow stuff in Drupal's .htaccess

AllowOverride All



mod_dbd.so is version 2.2.9 dated 13 Jun 2008, as shipped with the
installation package.
MySQL server is 'version 5.1.36-community'

The real questions are:
Does DBDPersist actually do anything in the WAMP environment?
If so, what is my real problem?
If not, should that be documented?

Regards,
Peter





------------------------------------------------------------ ---------
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: DBDPersist Off in vhost causes startup error logentries

am 17.08.2009 13:44:09 von Nick Kew

Peter Horn wrote:
> Hi All,
> I've been running Apache 2.2.9 / PHP 5.2.6 / Win XP SP3 with 3 named
> vhosts for about a year with no real problems. Recently I added a fourth
> vhost to run a Drupal site. This involved adding mySQL, and it all
> worked after the usual few setup iterations. After the site was running
> happily for a couple of weeks, I revisited the setup and removed
> 'DBDPersist Off' from the vhost. After I did this, I get the following
> messages in the error log at startup, even though the site subsequently
> appears to work correctly and there are no 'runtime' errors:
>
> [Sat Aug 15 12:25:22 2009] [error] (OS 126)The specified module could
> not be found. : DBD: mod_dbd not compatible with APR in get_driver
> [Sat Aug 15 12:25:22 2009] [error] (OS 126)The specified module could
> not be found. : DBD: failed to initialise

That means it's failing to load the database driver, and the error
is one that mod_dbd doesn't know about, so it can't report it
correctly to you. That's a bug, albeit a minor one (the error
message should be better).

Since Windows error 126 means nothing to me (it would be great if
you or anyone could say), it would be helpful to be able to
diagnose exactly why it can't load the mysql driver. Do you in
fact have the MySQL driver installed?

The fact your application works presumably means it isn't using
DBD, and PHP is connecting to MySQL using a pre-DBD method.
So you should be able to remove the DBD configuration.
If I'm wrong about that, then something strange is going on
and will need investigating!

As regards your questions, it's up to an application whether
it uses DBD or does its own thing. WAMP is neither more nor
less likely to use it than Unix/Linux based platforms.
For a single application it doesn't usually matter much,
but if you have several separate MySQL applications that
don't use DBD then you're placing a lot of extra load
on your server.

--
Nick Kew

------------------------------------------------------------ ---------
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: Re: DBDPersist Off in vhost causes startup errorlog entries

am 21.08.2009 00:47:03 von Peter Horn

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

Peter Horn wrote:
> Hi All,
> I've been running Apache 2.2.9 / PHP 5.2.6 / Win XP SP3 with 3 named
> vhosts for about a year with no real problems. Recently I added a
> fourth vhost to run a Drupal site. This involved adding mySQL, and it
> all worked after the usual few setup iterations. After the site was
> running happily for a couple of weeks, I revisited the setup and
> removed 'DBDPersist Off' from the vhost. After I did this, I get the
> following messages in the error log at startup, even though the site
> subsequently appears to work correctly and there are no 'runtime' errors:
>
> [Sat Aug 15 12:25:22 2009] [error] (OS 126)The specified module could
> not be found. : DBD: mod_dbd not compatible with APR in get_driver
> [Sat Aug 15 12:25:22 2009] [error] (OS 126)The specified module could
> not be found. : DBD: failed to initialise

That means it's failing to load the database driver, and the error
is one that mod_dbd doesn't know about, so it can't report it
correctly to you. That's a bug, albeit a minor one (the error
message should be better).

Since Windows error 126 means nothing to me (it would be great if
you or anyone could say), it would be helpful to be able to
diagnose exactly why it can't load the mysql driver. Do you in
fact have the MySQL driver installed?

The fact your application works presumably means it isn't using
DBD, and PHP is connecting to MySQL using a pre-DBD method.
So you should be able to remove the DBD configuration.
If I'm wrong about that, then something strange is going on
and will need investigating!

As regards your questions, it's up to an application whether
it uses DBD or does its own thing. WAMP is neither more nor
less likely to use it than Unix/Linux based platforms.
For a single application it doesn't usually matter much,
but if you have several separate MySQL applications that
don't use DBD then you're placing a lot of extra load
on your server.

--
Nick Kew


1. Windows error 126 is, to quote M$
126 The specified module could not be found. ERROR_MOD_NOT_FOUND

Not very informative...

2. You're right. I don't need mod_dbd.

3. When I get a bit more time, I'll explore the circumstances of my
original issue - turning on DBDPersist in a vhost triggers the
module-not-found error - and post a more specific description. I presume
LogLevel debug will be useful around module loading, or is there some
other magic setting I should use?

Peter


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







style="font-family: -moz-fixed; font-size: 13px;" lang="x-western">Peter
Horn wrote:


Hi All,


I've been running Apache 2.2.9 / PHP 5.2.6 / Win XP SP3 with 3 named
vhosts for about a year with no real problems. Recently I added a
fourth vhost to run a Drupal site. This involved adding mySQL, and it
all worked after the usual few setup iterations. After the site was
running happily for a couple of weeks, I revisited the setup and
removed 'DBDPersist Off' from the vhost. After I did this, I get the
following messages in the error log at startup, even though the site
subsequently appears to work correctly and there are no 'runtime'
errors:




[Sat Aug 15 12:25:22 2009] [error] (OS 126)The specified module could
not be found.  : DBD: mod_dbd not compatible with APR in get_driver


[Sat Aug 15 12:25:22 2009] [error] (OS 126)The specified module could
not be found.  : DBD: failed to initialise





That means it's failing to load the database driver, and the error


is one that mod_dbd doesn't know about, so it can't report it


correctly to you.  That's a bug, albeit a minor one (the error


message should be better).




Since Windows error 126 means nothing to me (it would be great if


you or anyone could say), it would be helpful to be able to


diagnose exactly why it can't load the mysql driver.  Do you in


fact have the MySQL driver installed?




The fact your application works presumably means it isn't using


DBD, and PHP is connecting to MySQL using a pre-DBD method.


So you should be able to remove the DBD configuration.


If I'm wrong about that, then something strange is going on


and will need investigating!




As regards your questions, it's up to an application whether


it uses DBD or does its own thing.  WAMP is neither more nor


less likely to use it than Unix/Linux based platforms.


For a single application it doesn't usually matter much,


but if you have several separate MySQL applications that


don't use DBD then you're placing a lot of extra load


on your server.




-- 

Nick Kew






1. Windows error 126 is, to quote M$









126 The specified module could not be found. ERROR_MOD_NOT_FOUND

Not very informative...



2. You're right. I don't need mod_dbd.



3. When I get a bit more time, I'll explore the circumstances of my
original issue - turning on DBDPersist in a vhost triggers the
module-not-found error - and post a more specific description. I
presume LogLevel debug will be useful around module loading, or is
there some other magic setting I should use?



Peter








--------------040100050000070101060102--

Re: DBDPersist Off in vhost causes startup error log entries

am 21.08.2009 06:22:24 von Nick Kew

A post on users@httpd highlights inconsistent practice in apr.

On 17 Aug 2009, at 01:48, Peter Horn wrote:

> Hi All,
> I've been running Apache 2.2.9 / PHP 5.2.6 / Win XP SP3 with 3
> named vhosts for about a year with no real problems. Recently I
> added a fourth vhost to run a Drupal site. This involved adding
> mySQL, and it all worked after the usual few setup iterations.
> After the site was running happily for a couple of weeks, I
> revisited the setup and removed 'DBDPersist Off' from the vhost.
> After I did this, I get the following messages in the error log at
> startup, even though the site subsequently appears to work
> correctly and there are no 'runtime' errors:
>
> [Sat Aug 15 12:25:22 2009] [error] (OS 126)The specified module
> could not be found. : DBD: mod_dbd not compatible with APR in
> get_driver
> [Sat Aug 15 12:25:22 2009] [error] (OS 126)The specified module
> could not be found. : DBD: failed to initialise

Problem: The user has got a confusing error message.

Diagnosis: apr_dso_load and apr_dso_sym on Windows platform
return an OS error instead of an APR error on failure.

As an APR user, mod_dbd handles the APR errors APR_EDSOOPEN
and APR_ESYMNOTFOUND and gives the user a tailored error
message. That was based on the behaviour of unix/apr_dso.

It's an inconsistency, and IMHO it's the Windows that should
be fixed. APR is supposed to shield applications from this
kind of platform-specific detail.

Quick survey of other APR platforms:
aix, beos, netware, os390 - conform to UNIX behaviour.
os2 - uses APR_FROM_OS_ERROR

So the safest/most consistent thing would seem to be to
fixup both Windows and OS2. Thoughts?

--
Nick Kew

------------------------------------------------------------ ---------
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: DBDPersist Off in vhost causes startup error logentries

am 21.08.2009 07:47:06 von wrowe

Nick Kew wrote:
>
> Problem: The user has got a confusing error message.
>
> Diagnosis: apr_dso_load and apr_dso_sym on Windows platform
> return an OS error instead of an APR error on failure.
>
> As an APR user, mod_dbd handles the APR errors APR_EDSOOPEN
> and APR_ESYMNOTFOUND and gives the user a tailored error
> message. That was based on the behaviour of unix/apr_dso.

Apparently, the macro APR_STATUS_IS_ESYMNOTFOUND etc aren't
correctly defined or utilized.

It is against APR practice to remap errors; the error results
from the apr_dso interface are correct. I'd be strongly -1 to
changing this practice.

It is consistent with APR practice to define APR_STATUS_IS tests
to capture the wide diversity of practices on different OS's,
this started with EAGAIN vs EWOULDBLOCK and has grown more
complex from year to year.

If you want to ensure we have the appropriate DSO-related
APR_STATUS_IS tests and use those within apu_dso, +1!

------------------------------------------------------------ ---------
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