CartMetrix - Do you know yours?

8/21/2006

More Mod_Auth_MySQL Tips

Adding mod_auth_mysql (v3.0) to an Apache server already using basic authentication breaks the basic authentication. Mod_auth_mysql seems to supersede any other authentication schemas. A simple workaround I found was to explictly turn off Mod_auth_mysql using a .htaccess for those directories that will still use basic authentication.

AuthMySQLEnable Off

Popularity: 14%

8/18/2006

Mod_Auth_MySQL and ErrorDocument with Apache

Mod_Auth_MySQL is a useful Apache module for allowing HTTPD Authentication against a MySQL database. This makes it very convenient to code a simple authentication process in PHP.

I beat my head against this problem for an hour before I found the solution…

When using an ErrorDocument directive in a .htaccess file similar to the form:

ErrorDocument 401 /error.php?err=401

Apache, ErrorDocument 401 and Mod_Auth_MySQL don’t seem to play nice together. Tested on several different servers, Apache kept throwing a 401 Unauthorized error back no matter how I configured it.

Turning off the ErrorDocument 401 directive for the protected directory with the following directive seems to work around the problem.

ErrorDocument 401 -

Not a perfect solution as 401’s in the protected directory will either be blank or the Apache default.

Popularity: 15%

8/4/2006

Quick and Dirty MySQL Backup

This is great for a quick backup of all databases before performing maintenance or check/repair.

mysqldump –all-databases -p | gzip > db_dump-YYYYMMDD.gz

Replace YYYYMMDD with Year, Month and Day.

Related Link: payday loans cash advance needs

Popularity: 22%


damonparker.org is proudly powered by WordPress
Entries (RSS) and Comments (RSS).

copyright © 2002-2008 damonparker.org. all rights reserved.

Close
E-mail It