Apache mod_auth_mysql problem
Hi I am having a problem with using mod_auth_mysql with apache 2.2 on RHEL4.
I have managed to get authentication working but whenever anyone accesses the areas of the site which are protected the error log file is filled with [error] Internal error: pcfg_openfile() called with NULL filename The appropriate bits of the httpd.conf look like #Stuff for Munit monitoring ScriptAlias /monitoring/cgi "/usr/local/munin/var/www/cgi/" Alias /monitoring "/usr/local/munin/var/www/" <Directory /usr/local/munin/var/www/> #mod_auth_mysql stuff AuthName "xxxxx" AuthType Basic AuthBasicAuthoritative Off AuthMySQLHost localhost AuthMySQLDB http_auth AuthMySQLPasswordField user_passwd AuthMySQLUserTable http_auth_users AuthMySqlUser xxxx AuthMySqlPassword xxxx AuthMySQLEnable On AuthMySQLPwEncryption MD5 AuthMySQLAuthoritative On require valid-user </Directory> <Directory /usr/local/munin/var/www/cgi> AllowOverride none Options ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> Anyone have any ideas why its giving this error message Thanks J. |
For anyone who has the same problem the fix is to add the following line to the <directory> directives
AuthUserFile /dev/null The error messages are apparently caused by apache 2.2.2 expecting a users file even if the auth method doesn't use one. And also probably by the fact that you need to use an unofficial patch to get mod_auth_mysql to complile. J. |
Thanks John. Cleared it right up for me.
|
i don't mean to bump this, but i've been struggling with this all night and this fixed it so i gotta say thanks!
edit: all is not well... it keeps saying user not found. did either of you experience that? im on apache 2.2 and mod_auth_mysql 3.0 |
Could you post the exact error you are getting?
I can't tell from the information you provided whether it's an apache user error or a mysql user error. Cheers J. |
i am getting a message saying user not found in the apache error log. my config matches what is above
|
I need the exact text of the error message.
Have you tried logging in to mysql from the command line with the user that you have specified as authmysqluser ? e.g. mysql -u authusername -p authuserpass where authusername and authuserpass are what you specified in the apache configuration file. J. |
I think I have the same problem
This is the error I'm getting when I try to view our website, thearkinc.com:
Unable to connect to database server This either means that the username and password information in your settings.php file is incorrect or we can't contact the MySQL database server. This could mean your hosting provider's database server is down. The MySQL error was: Access denied for user: 'mysqluser@localhost' (Using password: YES). Currently, the username is arksqluser and the database server is localhost. * Are you sure you have the correct username and password? * Are you sure that you have typed the correct hostname? * Are you sure that the database server is running? I've discovered it's only the parts of the site that uses the mysql db that doesn't work, so I tried to login on the command line using: mysql -u myauthuser -p myauthpasswd as root and I get: ERROR 1045: Access denied for user: 'myauthuser@myhost' (Using password: YES) I know I'm using the correct username and password. I've restarted the server to no avail and restarted the mysqld service with no errors. Any ideas would be greatly appreciated. Thanks in advance for any help. The server is running RH w/ Fedora Core 2 |
Got it
So, our server uses a program called Plesk. For some reason it seems to overwrite files at random times. Can't figure that out yet, but I can access Plesk Control Panel online. The fix was to turn the domain controler back on and somehow this fixed the mysql login problem. Yes, I am new to this. Thanks.
|
All times are GMT -5. The time now is 07:27 PM. |