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

    Join Date
    Oct 2000
    Posts
    9
    Rep Power
    0
    Can someone post up a sample .htaccess file that is able to use a MySQL database?
    Thanks in advance,
    Jeremy
  2. #2
  3. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    28
    Rep Power
    0
    What do you mean by that?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    9
    Rep Power
    0
    A normal .htaccess file will have
    -----------------------------------
    Authentication Basic
    ...
    Allow from All
    Require valid-user
    -----------------------------------
    Apache uses .htaccess files for Authenticaton purposes (i.e. to let certain people in)

    There is a way to do MySQL Authentication.
    (i.e. keep the list of people in a Mysql Database and have Apache look in the database to find the names)
    I have RedHat 6.2 installed. (so I am assuming that since I installed the Apache and MySQL RPM's that I have all the components that I need installed.)
    All the pages I have been to tell me where to go to get the stuff how to install it (I usually have some problem installing 'like what is "Apachectl"? I don't need it my web server is running fine' that they didn't address. And I loose the flow of the web page)

    QUESTION: Could somebody post and example .htaccess file that references the MySQL Database (instead of that text file) for its list of names.
    I hope this helps,
    Jeremy
  6. #4
  7. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>I am assuming that since I installed the Apache and MySQL RPM's that I have all the components that I need installed

    If you satisfy with your current Apache, then the answer to you is YES. But RPM is not flexible and Apache has too many options, so Apache RPM cannot enable your favorite options as it just enable the generic options, that is why you should always compile Apache from source.

    >>Could somebody post and example .htaccess file that references the MySQL Database

    Download http://download.sourceforge.net/mirr...ql-2.20.tar.gz

    Everything you need is there. But you may run into problem when installing it. You probably need to uninstall your Apache RPM. Or you can go to rpmfind.net and see if such module in RPM format is available.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    9
    Rep Power
    0
    THANK YOU THANK YOU.
    Downloaded the file. FOR ALL FUTURE PERSONS READING THIS POST!!! IT IS THE "USAGE" file inside the tar.gz file. (it took me 2 days to realize it wasn't the readme file and compiling the thing didn't provide any more secret hidden popup screen documentation).

    it said something strange
    "If you're using a MySQL server other than localhost, and/or you want to specify a different user than the httpd user when accessing the MySQL server... use
    Auth_MySQL_Info <host> <user> <password>"

    Is the actual httpd user "httpd" or apache's "nobody"?
    Any help is appreciated, thanks for the freebie "FreeB"
    Jeremy
  10. #6
  11. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>IT IS THE "USAGE" file inside the tar.gz file

    I actually mentioned it before -> http://www.devshed.com/Talk/Forums/F...ML/000245.html at posted September 28, 2000 02:26 PM.

    >>Is the actual httpd user "httpd" or apache's "nobody"?

    User "nobody" by default unless you have changed it.
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    9
    Rep Power
    0
    Yeah I saw that at about 5 o'clock this morning.
    I got the latest webserver installed from scratch got mod_auth_mysql extracted I run the .configure --with-apache=/usr/include/apache
    have just gotten stuck it can't find the httpd.h file.
    I type "locate httpd.h" comp says "/usr/include/apache"
    I look in the directory and whalaa there it is.
    How can I make the configure script see it?
    Jeremy
  14. #8
  15. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    You should enable DSO when building Apache. If you choose the other method --with-apache, then it should point to your Apache source directory, not /usr/include/apache.

    Click the search link on this page and search for "DSO" in Apache forum, you should see this has been discussed dozen times. I am not going to repost it again.

IMN logo majestic logo threadwatch logo seochat tools logo