Menu

module not working with apache 1.3.33

Help
2005-04-19
2013-04-23
  • Jakob Curdes

    Jakob Curdes - 2005-04-19

    Hi all,
    I am trying to get mod_auth_mysql 2.90 to work with apache 1.3.33. I compiled the modules dso, obviuously it inserts cleanly [no messages at httpd startup], but when I use it I get

    "/.htaccess: Invalid command 'AuthMySQLEnable', perhaps mis-spelled or defined by a module not included in the server configuration"

    When I remove SQLEnable, this moves to the next entry in the .htaccess file. This is the top-level directory of that virtual server and I am trying to access the index page.

    I have a working setup with apache 1.3.28 and the old mod_auth_mysql  module, but I think it is time to upgrade. And voila, things get difficult. Here is my .htaccess contents :

    AuthName "foobar"
    AuthType Basic
    require valid-user
    # AuthMySQLEnable On
    AuthMySQLHost localhost
    AuthMySQLUser foo
    AuthMySQLPassword  bar
    AuthMySQLDB test_sql_users
    AuthMySQLUserTable usertable
    AuthMySQLNameField userid
    AuthMySQLPasswordField passwd
    AuthMySQLPwEncryption Plaintext
    AuthMySQLAuthoritative On
    AuthMySQLGroup_Field gid
    AuthMySQLGroupTable usertable

    And this was my old setup in the old apache which still works :

    AuthName "Foobar"
    AuthType Basic
    require valid-user
    Auth_MySQL_DB test_sql_users
    Auth_MySQL_Password_Table usertable
    Auth_MySQL_Username_Field userid
    Auth_MySQL_Password_Field passwd
    Auth_MySQL_Encryption_Types Plaintext
    Auth_MySQL_Authoritative On
    Auth_MySQL_Group_Field gid
    Auth_MySQL_Group_Table usertable
    (The SQl username et cetera had to be set in httpd.conf with this very old module.)

    How can I diagnose why apache claims the module isn't loaded ? Or do I simply have some syntax error?

    Thx for hints,
    Jakob Curdes

     
    • Jerry Stuckle

      Jerry Stuckle - 2005-04-19

      Jakob,

      It looks like the module isn't being loaded.  Ensure you have the following statement in your httpd.conf:

      LoadModule mysql_auth_module modules/mod_auth_mysql.so

      On Apache 1.x, you may also need

      AddModule mod_auth_mysql.c

      If the module is already added, the AddModule should give you an error message on startup.

      Also, check your Apache error log.  Does it have any information?

      mod_info will show you the loaded modules.  You will need to load it, then add

      <Location /info>
        SetHandler server-info
      </Location>

      to your httpd.conf file.

      Either password protect this directory in your httpd.conf file or don't leave it up - otherwise it's a security risk.

      Now, going to http://yoursite.com/info in a browser will show you what's loaded   You should see mod_auth_mysql.c in the list at the top, and scrolling down, see the directives for the module.

      Hope this helps.

      Jerry

       
    • Jakob Curdes

      Jakob Curdes - 2005-04-20

      Sorry, I was unclear about this. The module is loaded in httpd.conf as described by you (as was the old one). No error messages on startup. I will check what mod_info says - I don't have it compiled in for security reasons so this may take a while.

      Thanks for now,
      Jakob Curdes

       
    • Jerry Stuckle

      Jerry Stuckle - 2005-04-20

      Hi, Jakob,

      No, I understand you believe it is being loaded.  However, if the correct module were loaded, you wouldn't be getting these messages.  The only two reasons I can think as to why this would be is the module isn't being loaded, or it's loading the wrong module.

      BTW - I think it's a good idea to have mod_status and mod_info available as DSO's.  I agree with you not to compile them in - but they're handy to have available when you need them.  I might recommend rather than recompiling all of Apache, you just do these two modules as DSO's (you may be able to do this with apxs - I haven't tried it on them).

      Jerry

       
    • Jakob Curdes

      Jakob Curdes - 2005-04-21

      It turns out that apache failed to restart cleanly so indeed the module was not loaded .-)) . I run my new apache from an alternate config file on port 81 but neglected to set different lock and run paths, so the restart would fail.

      mod_auth_mysql is loaded and works - almost.
      We have plaintext passwords in the database; however I always get a password mismatch and if I specify "Plaintext" as auth mechanism, it says that this is not a valid encryption method. Well, plaintext is not _really_ an encryption method...

      What do I have to specify for plaintext passwords ?

      Yours,
      Jakob Curdes

       
    • Jerry Stuckle

      Jerry Stuckle - 2005-04-21

      Hi Jakob,

      Glad to hear you got it loaded OK.

      For plaintext passwords, specify

      AuthMySQLEncryption none

      See the CONFIGURE file for details.

      Jerry

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.