On Tue, 8 Jan 2008 10:18:49 +0000
Nick Kew <[EMAIL PROTECTED]> wrote:
> OK, since you're using APR 1.3, you can get a bit more error message
> by patching mod_dbd as follows (modulo my mailer's line wrap):
Bah. That patch should of course be as attached.
--
Nick Kew
Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/
Index: modules/database/mod_dbd.c
===================================================================
--- modules/database/mod_dbd.c (revision 609791)
+++ modules/database/mod_dbd.c (working copy)
@@ -459,6 +459,7 @@
apr_pool_t *rec_pool, *prepared_pool;
ap_dbd_t *rec;
apr_status_t rv;
+ const char *err = "";
rv = apr_pool_create(&rec_pool, pool);
if (rv != APR_SUCCESS) {
@@ -502,12 +503,12 @@
return rv;
}
- rv = apr_dbd_open(rec->driver, rec->pool, cfg->params, &rec->handle);
+ rv = apr_dbd_open_ex(rec->driver, rec->pool, cfg->params, &rec->handle, &err);
if (rv != APR_SUCCESS) {
switch (rv) {
case APR_EGENERAL:
ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server,
- "DBD: Can't connect to %s", cfg->name);
+ "DBD: Can't connect to %s: %s", cfg->name, &err);
break;
default:
ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server,
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]