The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mod_auth_mysql - compiles clean - doesn't work

Discussion in 'General Discussion' started by soundguy, Jan 23, 2006.

  1. soundguy

    soundguy Well-Known Member
    PartnerNOC

    Joined:
    Oct 29, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    seattle
    I've been trying (unsuccessfully) to install mod_auth_mysql on a Cpanel-Release/CentOS 4.1 box. It compiles clean and apxs seems to install correctly but any attempt to use the module in .htaccess throws the error Invalid command 'Auth_MYSQL', perhaps mis-spelled or defined by a module not included in the server configuration which leads me to believe it's not being loaded.

    According to the docs, the correct statement in httpd.conf is

    LoadModule mysql_auth_module modules/mod_auth_mysql.so

    but since that directory doesn't exist, I have been using

    LoadModule mysql_auth_module libexec/mod_auth_mysql.so

    because that's where the module actually is, along with every other dynamic module on this box. I'm also unclear on where to put the line

    AddModule mod_auth_mysql.c

    Logic dictates that it would go at the end of the list of XXX.c statements, but at least one article I ran a cross in the wild stated that it needed to go at the top of that group or it would break .htaccess altogether. (I tried it at the bottom and everything did indeed stop working)

    Lastly, the module is compiled to be active all the time, but I need to run more than one authorization scheme on this machine for a little while longer while I do some testing, so I need to turn it off in httpd.conf for now, but I can't figure out where (and how) to add Auth_MYSQL Off without causing an error in Apache.

    I'm pretty sure that I'm close to having it working, but I just don't have things correct in httpd.conf. Can someone who has the module working tell me "top or bottom" on the AddModule statement and then provide in the exact syntax, context, and location of the "Auth_MYSQL Off" line?

    Thanks. This kind of information really needs to be included in the docs, but of course it isn't. I already have an inquiry on the Sourceforge project forum, but I haven't received a response yet.
     
  2. soundguy

    soundguy Well-Known Member
    PartnerNOC

    Joined:
    Oct 29, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    seattle
    So then...no one here uses this module?
     
  3. Gavster

    Gavster Active Member

    Joined:
    Apr 3, 2002
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    You appear to be using the older, depracated syntax for mod_auth_mysql directives - which version did you build?

    modules/mod_auth_mysql.so is correct - since "modules" is mapped to /usr/local/apache/libexec when apache is compiled.

    I've had no problems with it at the end of the list, but if you are having problems, try it at the top of the list.

    I'd recommend that you re-compile mod_auth_mysql with the -DENABLE=0 flag - this will keep it off globally, and you can turn it on anywhere in .htaccess or a virtual host container with:

    AuthMySQLEnable On

    Alternatively, you can just turn it off globally in httpd.conf with:

    AuthMySQLEnable Off

    Then re-enable on a virtual host or .htaccess basis.

    Actually, it is. See the CONFIGURE file in the source package. Latest version can be downloaded from http://sourceforge.net/projects/modauthmysql/

    Kind regards,

    Gavin
     

Share This Page