MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 13th, 2000, 02:19 AM
lisa philips lisa philips is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Posts: 25 lisa philips User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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

Reply With Quote
  #2  
Old September 13th, 2000, 02:56 PM
Carpe Diem
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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 £

Reply With Quote
  #3  
Old September 14th, 2000, 05:07 AM
lisa philips lisa philips is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Posts: 25 lisa philips User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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


Reply With Quote
  #4  
Old September 14th, 2000, 08:18 AM
wolph wolph is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: Sharon, Connecticut, USA
Posts: 6 wolph User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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.

Reply With Quote
  #5  
Old September 14th, 2000, 03:48 PM
lisa philips lisa philips is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Posts: 25 lisa philips User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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.

Reply With Quote
  #6  
Old September 15th, 2000, 04:52 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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.

Reply With Quote
  #7  
Old September 17th, 2000, 05:22 AM
lisa philips lisa philips is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Posts: 25 lisa philips User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > MySQL authentication with apache htaccess


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT