#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    25
    Rep Power
    0
    Hi

    I want to Combine HTTP authentication with a simple database authentication to maintain a users authenticated state while still having access to the functionality of the database. As far as I’m aware with HTTP authentication realms can be created which the user must authenticate with. Apparently Apache can be configured to do this using the following directives in a .htaccess file or in a <Directory> section in httpd.conf. I have opted for the latter. For example:

    AuthName “Admin Site”
    AuthType Basic
    AuthUserFile /etc/httpd/users
    require valid-user

    My question is how do I make the AuthUserFile specify the path to a MySQL database and the relevant table?

    Thanks Lisa
  2. #2
  3. No Profile Picture
    Carpe Diem
    Guest
    Devshed Newbie (0 - 499 posts)
    You can get a module to do ir.

    I recently used some PHP/MySQL code,
    because it looks messy posted here I have put the code at the following link :-
    http://carpediem-it.co.uk/devshed/

    The code is simple and the pages I have put are are not very pretty but it allows you to view the MySQL table/PHP code add users and login etc....

    Hope it helps

    Regards
    Darren http://www.php4hosting.com $ http://www.php4hosting.co.uk £
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    25
    Rep Power
    0
    I obtained mod_auth_mysql-2.20.tar. When I tried to configure it using the following command:

    ./configure –with-mysql=/usr/local/mysql –with-apache=/usr/local/apache

    I received the following error:

    Configure: error: Invalid Apache directory – Unable to find httpd.h
    under /usr/local/apache

    I know that apache’s path is /usr/local/apache. I checked for this missing file in my installation but only found a similarly named file in apache/bin called “httpd”.

    I tried to check what version of apache I had with the command httpd –v I got the responce:

    bash: httpd: command not found

    Puzzled as to why this command was not working I tried the following: gcc –v . This produced as expected the version of gcc compiler I had installed.

    Do you know how I can Install this module correctly?

    Thanks Lisa

  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Sharon, Connecticut, USA
    Posts
    6
    Rep Power
    0
    ./configure -with-mysql=/usr/local/mysql -with-apache=/usr/local/apache

    I received the following error:

    Configure: error: Invalid Apache directory - Unable to find httpd.h
    under /usr/local/apache
    --------------------------------------------
    Hi Lisa. The configure script wants the location of your apache source tree, not your apache installation. It could be relative to where you are working, e.g.,

    -with-apache=../apache_1.3.12

    or it could be some absolute path. You may not have saved the source tree, in which case you will have to un-tar a new one.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    25
    Rep Power
    0
    Thanks for replying.
    But I’m not quite sure what you mean by source tree. Can you elaborate? Also do you mean untar a new module or Apache?


    Lisa.
  10. #6
  11. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    Check here -> http://www.devshed.com/Talk/Forums/F...ML/000202.html

    Once again, if DSO method is available, use --with-apxs. Or else, you have to either recompile Apache with DSO support or recompile Apache and compile mod_auth_mysql statically.
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    25
    Rep Power
    0
    Hi

    I tried to follow the guide in re-compiling apache at:The above link.

    However, I couldn’t find the following gd-1.8.1 and jpeg-6b. I ran

    ./configure –with-layout=Apache –enable-module=most –enable-shared=max –disable-rule=WANTHSREGEX

    Which was fine. When I tried make I got the following problems:

    In file included from mod_rewrite.c:92 mod_rewrite.h:129:ndbm: no such file or directory.

    Can you help?

    Thanks
    Lisa

Similar Threads

  1. Mysql problem.
    By Nik in forum MySQL Help
    Replies: 54
    Last Post: December 21st, 2006, 07:02 PM
  2. MySQL to MS SQL 2000
    By diskord in forum MySQL Help
    Replies: 0
    Last Post: February 6th, 2004, 08:00 PM
  3. installing apache, php and mysql
    By lucilue2003 in forum PHP Development
    Replies: 9
    Last Post: January 8th, 2004, 10:18 AM
  4. Replies: 3
    Last Post: December 25th, 2003, 06:16 AM

IMN logo majestic logo threadwatch logo seochat tools logo