|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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 £ |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
./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. |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
|||
|
|||
|
Check here -> http://www.devshed.com/Talk/Forums/Forum15/HTML/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. |
|
#7
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > MySQL authentication with apache htaccess |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|