Page 1 of 1

Password protecting HESK site - htaccess/htpasswd

Posted: Wed Jul 20, 2005 2:23 am
by matt24
Script URL: support.berginct.com/index.php
Version of script: .93
Version of PHP: php-4.3.9-3.2
Hosting company: My Own
Have you searched THIS FORUM for your problem: Yes
(if not please do before posting)
If so, what terms did you try:

Write your message below:

Hello,

Firstly thankyou for the excellent program HESK. It installed easily and is a great tool for ticketing and as a help desk feature.
I am trying to password protect the site I created with HESK with htaccess and htpasswd files. It is running on a apache webserver and CENTOS operating system.
No matter what I do I cannot password protect the HESK directory without receiving errors. I simply cannot login - even though my username and password are correct.
A scan of the apache error_logs shows the following entries each time authentication failure occurs :

tail -2 /var/log/httpd/error_log
[Wed Jul 20 11:43:43 2005] [error] [client 203.89.220.238] MySQL ERROR: Table 'test.user_info' doesn't exist: /
[Wed Jul 20 11:43:43 2005] [error] [client 203.89.220.238] MySQL user matthew not found: /

It seems that mysql is interfering with the authenticaion process? -
I have configured this sort of authentication before and it works fine. Is there something in index.php or other file in the base directory that call mysql to perform some sort of authentication? I wouldnt think so....I have also added a directive to the webserver conf file and removed the htaccess file from the root of the web directory, but I still am refused and the logs show the same mysql errors.

I am really at a loss with this - have tried many ways to get it to work, asked and posted on apache forums...obviously mysql needs to be running for the page to load, but for some reason it is interfering with authentication process..I assumed at first it was an apache/config error but I then thought maybe it was the HESK program....a possible bug?

As I said I love the program and am very grateful - if I could add a layer of security it would be perfect for my needs.

If this is totally unrelated and not a HESK issue then I would appreciate knowing that as well.

Any help or guidance would be greatly appreciated.

Kind Regards

Posted: Wed Jul 20, 2005 5:08 pm
by Klemen
Hi,

This isn't a problem with Hesk, must be something else. 'user_info' is not a table that comes with Hesk and you seem to have problem with that.

I have zero expereince with CentOs but since you have apache installed you should be able to get .htaccess working somehow. Try searching google for "htaccess tutorial", "htaccess on CentOS" etc. (without quotes)

Regards

Posted: Thu Jul 21, 2005 3:33 am
by matt24
Thankyou for your suggestions, I appreciate it .

I have it working now, as you suspected it was related to the OS - CENTOS.

From further googling I finally found that you need to prevent mod_auth_mysql to do the mySQL authentication.

Simply adding this directive to the httpd.conf file fixed it immediately

<Directory "var/www/html/">
AuthMySQLEnable off
AllowOverride All
</Directory>

Thanks again!

Cheers

Posted: Sat Oct 22, 2005 5:35 am
by chokra
Thanks matt :wink: for taking the time to share with us the way you resolved the issue.