Password protecting HESK site - htaccess/htpasswd

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
matt24
Posts: 2
Joined: Wed Jul 20, 2005 2:09 am

Password protecting HESK site - htaccess/htpasswd

Post 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
Klemen
Site Admin
Posts: 10141
Joined: Fri Feb 11, 2005 4:04 pm

Post 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
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
matt24
Posts: 2
Joined: Wed Jul 20, 2005 2:09 am

Post 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
chokra
Posts: 7
Joined: Sun Oct 09, 2005 3:40 pm

Post by chokra »

Thanks matt :wink: for taking the time to share with us the way you resolved the issue.
Post Reply