Funky Clouds

B.J.’s funky little home on the net

Archive for the ‘Work’ Category

20
Jun
2007

I just installed the mod_auth_mysql module on an old decrepit AIX 5.1 machine because it’s very stinkin’ cool to be able to use a database table instead of an htpasswd file to store user accounts. Thought I’d post my notes here in case it helps someone.

compile the bieach:

./apxs -c -L/usr/lib/mysql -I/usr/include/mysql -lmysqlclient -lm -lz /src/mod_auth_mysql-3.0.0/mod_auth_mysql.c -bexpall

move the mod_auth_mysql.so into /usr/local/apache/libexec/

In httpd.conf add:
LoadModule mysql_auth_module libexec/mod_auth_mysql.so
AddModule mod_auth_mysql.c

Adding in the module with the above causes everything to try to use MySQL to auth. This breaks any existing htpasswd type ones. To use both put this in the main <directory> area

AuthMySQLEnable off

Then turn it on for the specific directories where you want to use MySQL auth.

Setup a directory to secure:
create a USER table in a database etc…

put something like this in httpd.conf:

<directory /www/htdocs/somedir/>
DirectoryIndex index.php index.html default.php index.htm
FancyIndexing on
AllowOverride AuthConfig
AuthName “My Test”
AuthType Basic
require valid-user
AuthMySQLPwEncryption scrambled
AuthMySQLHost localhost
AuthMySQLDB authdb
AuthMySQLUserTable user
AuthMySQLUser authuser
AuthMySQLPassword authpasswd
AuthMySQLNameField username
AuthMySQLPasswordField password
AuthMySQLAuthoritative On
</directory>

apachectl restart yo

references (because i don’t come up with this stuff myself ya know):
http://www.linuxhelp.net/guides/htaccessmysql/
http://modauthmysql.sourceforge.net/CONFIGURE
http://www.webhostgear.com/215.html

Administrator

Post a Comment

16
Nov
2006

So I talked to this psychic guy this weekend. I don’t normally give psychics much credence, but this guy sure hit the nail on the head. I need to start my business that I’ve had in my head for almost a year now. I just met with some people to help them with a change on their site and it completely charged me up. It always does. To go out into the world and set people up with my point and click solution is what I want to do. I should make it my goal this weekend to work on the software for it some more.

You know what my problem is. I always have ideas in my head. When I look at something I see it for what it could be. Sometimes I try to work really hard to make things into my visions for them. Other times I feel completely overwhelmed by everything I want to do. Ultimately this all just leads to me getting depressed that I’m not accomplishing enough. I think I send too much time working on things that I have to work on and not things that I want to work on. This causes me to be very unproductive. I need to rearrange my life so I’m only working on things that I want to do.

Administrator

Comments (1)

4
Nov
2005

What a day… The operation began at 2. I went into it thinking that it was going to be routine and easy. It wasn’t. It was one complication after another. Things just kept getting worse. After about 3 tedious hours I had exhausted all hope. I had lost the battle. I got up and walked out of the room. His wife was standing there on the other side of the doors waiting. Delivering the distressing news to her was gut wrenchingly difficult. As the words stated coming out of my mouth my mind was somewhere else. “Did I really try my best?” I was asking myself. “Am I not smart enough? Could someone else have done better?” Wearing a sorrowful and exhausted expression, I told her, “I’m sorry. I couldn’t get the wifi to work on your husband’s computer”

Administrator

Post a Comment

28
Oct
2005

My week at work sure went fast. I really feel like I didn’t get much done. I reformatted a test computer so I could start some tests with a clean slate. While I was at it I installed the new MySQL 5.0. All seemed well until I tried to use it via the MyODBC 5.0 driver. There is some bug in there somewhere that makes very bad things happen when you start playing with time fields. I put in a bug report with MySQL about it. I’ll admit I filed the bug report mainly out of greed. MySQL is giving out an iPod a week to a random person who submits a bug to them. Since the CD player in my car is shot an iPod would sure be nice, but there’s no way I’m gonna fork over $300 for one myself.

Well I just got MySQL 4.1 back on the pc along with MyODBC 3.51.12. After a week of spinning my wheels things finally seem to be working. Finally my program is importing data into the database error free. I guess this sets me up to make some major progress next week. Though I feel bad that I am completely neglecting another client whom I don’t have time for. We really need to get another programmer in here. Any takers?

Administrator

Comments (3)