Apache 和 mod_dbd 获取“DBD:mod_dbd 与 get_driver 中的 APR 不兼容”

Apache 和 mod_dbd 获取“DBD:mod_dbd 与 get_driver 中的 APR 不兼容”

我尝试使用 Apache 服务器和插件实现基本身份验证,代理部分运行良好,但是当我尝试执行假设触发 mod_authn_dbd 及其依赖项的请求时,我收到此错误:

[Sat Sep 03 17:42:38 2011] [error] (OS 126)The specified module could not be found.  : DBD: failed to initialise
[Sat Sep 03 17:42:38 2011] [error] [client 192.168.16.2] Failed to acquire database connection to look up user 'admin'

这是我的配置:

<VirtualHost 133.133.16.2:8090>
    ServerAdmin ed_mann@dont_spam_me.ok
    DBDriver mysql
    DBDParams "host=localhost port=3306 dbname=test user=root pass=root"

    DBDMin 1
    DBDKeep 8
    DBDMax 20
    DBDExptime 300

    <Proxy http://localhost:8080/jsp-examples/>
        Order Allow,Deny
        Allow from all
    AuthType basic
        AuthName "private area"
        AuthBasicProvider dbd
       # core authorization configuration
      Require valid-user

       # mod_authn_dbd SQL query to authenticate a user
       AuthDBDUserPWQuery \
       "SELECT password FROM users WHERE name = %s"
    </Proxy>
    RewriteEngine On
    RewriteRule ^(.*)$ http://localhost:8080/jsp-examples/$1 [P]

    DocumentRoot "D:/cpp/Projects/Game/workspace"
    ServerName localhost
    ErrorLog logs/dev30-error.log
    CustomLog logs/dev30-access.log common

    <Directory ""D:/cpp/Projects/Game/workspace">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

</Directory>

</VirtualHost>

我做错了什么?mysql 正在运行 (phpMyadmin 运行良好),apache 代理运行良好。

答案1

如果您使用 64 位 Windows 和 64 位 mysql,请尝试将 mysql 更改为 32 位版本。或者您可以将 mysql 5.0 32bit 中的 libmysql.dll 放在 apache bin 目录中。可以从 mysql.org 档案中以 zip 文件的形式获取 mysql 5.0。

相关内容