You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Spence <sc...@gmail.com> on 2006/08/13 22:55:01 UTC

[users@httpd] DBD: driver

Originally posted in APR Dev
(http://www.nabble.com/DBD%3A-driver-tf2088429.html#a5760878)

I'm new to this, but hopefully someone can shed some light on this.  I'm
trying to install Apache 2.2, MySQL 5, and PHP 5 on a Mac OSX (10.3.9)
server.  The server already runs Apache 1.3, MySQL 4, and PHP 4
successfully.

I initially used the default configuration:
./configure --enable-modules=most --enable-mods-shared=max
--enable-shared=max

But then when I attempted to start Apache, Apache starts, but will not serve
any pages.
I looked in the error log and found the following message:

[Thu Aug 10 19:30:35 2006] [crit] (70023)This function has not been
implemented on this platform: DBD: driver for [DBDriver unset] not available
[Thu Aug 10 19:30:35 2006] [crit] (70023)This function has not been
implemented on this platform: DBD: failed to initialise

I then downloaded apr_dbd_mysql.c, ran buildconf and then followed the
instructions on http://httpd.apache.org/docs/2.2/install.html for manually
building APR/APR-Utils.  I recompiled Apache with the --with-apr and
--with-apr-utils flags, but I still receive the error message when
attempting to start apache.

I'm using the default httpd.conf file with no DBD directives.  If I attempt
to set the DBDDriver directive in httpd.conf, I receive the error message: 
DBD: No driver for mysql
and Apache fails to start.

Can anyone help shed some light on this?

Thanks!
-- 
View this message in context: http://www.nabble.com/DBD%3A-driver-tf2100248.html#a5788296
Sent from the Apache HTTP Server - Users forum at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] RE: DBD: driver

Posted by Spence <sc...@gmail.com>.
Thanks for the pointer.  I think the problem was that in apu.h after running
configure, I had:

#define APU_HAVE_PGSQL         0
#define APU_HAVE_MYSQL         0
#define APU_HAVE_SQLITE3       0
#define APU_HAVE_SQLITE2       0

(I changed the second line to "#define APU_HAVE_MYSQL 1")

which was why Apache claimed that the driver was unset.
-- 
View this message in context: http://www.nabble.com/DBD%3A-driver-tf2100248.html#a5821843
Sent from the Apache HTTP Server - Users forum at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] DBD: driver

Posted by Rob Sterenborg <ro...@sterenborg.info>.
Spence <ma...@gmail.com> wrote:
...
> I then downloaded apr_dbd_mysql.c, ran buildconf and then followed
> the instructions on http://httpd.apache.org/docs/2.2/install.html for
> manually building APR/APR-Utils.  I recompiled Apache with the
> --with-apr and --with-apr-utils flags, but I still receive
> the error message when attempting to start apache.
> 
> I'm using the default httpd.conf file with no DBD directives.
>  If I attempt to set the DBDDriver directive in httpd.conf, I receive
> the error message: DBD: No driver for mysql
> and Apache fails to start.
> 
> Can anyone help shed some light on this?

I actually had to modify a few files to get things working.

- In apr-util-1.2.7, dbd/apr_dbd_mysql.c.
The mysql.h and errmsg.h files couldn't be found. I have this now:
/*
#ifdef HAVE_MYSQL_H
#include <mysql.h>
#include <errmsg.h>
#elif defined(HAVE_MYSQL_MYSQL_H)
#include <mysql/mysql.h>
#include <mysql/errmsg.h>
#endif
*/
#include "/usr/local/include/mysql/mysql.h"
#include "/usr/local/include/mysql/errmsg.h"

-> buildconf
-> configure

- In apr-util-1.2.7, include/apu.h.
For some reason MySQL support was disabled after configure. I changed it
to:
#define APU_HAVE_MYSQL         1

- In apr-util-1.2.7, Makefile:
I added some information:
INCLUDES = [...] -I/usr/local/include/mysql
APRUTIL_LDFLAGS = [...] -L/usr/local/lib/mysql
APRUTIL_LIBS = [...] -lmysqlclient_r

-> make
-> make install

-> compile apache

Now, I'm sure this is surely not the correct solution but I'm not a C
programmer, it compiled and works right now.


Grts,
Rob


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org