Unable to login as Administrator

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
yehey_mar

Unable to login as Administrator

Post by yehey_mar »

Script URL:
Version of script: hesk093
Version of PHP: PHP 5.0.4
Hosting company:
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,

I cannot seem to login as Administrator using the password "admin" as you have mentioned from the readme.htm. I was able to create tickets and the email functionality works great.

Here is the message received from the Apache error log:
[client X.X.X.X] PHP Warning: Invalid argument supplied for foreach() in /data/hesk/inc/common.inc.php on line 180, referer: http://X.X.X.X:8181/admin.php

Any help will be greatly appreciated!!!
Klemen
Site Admin
Posts: 10141
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Please give me the URL of your script, I need to check this myself to see if there is something wrong with your session handling.

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
yehey_mar

Post by yehey_mar »

Hi Klemen,

Unfortuntately, the site is behind a firewall so I don't think you will be able to view it at all. Is there a particular file or could you recommend any things I need to look into to solve the problem? Thanks so much in advance!
Klemen
Site Admin
Posts: 10141
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Hi,

There are 2 things to check the way I see it now:

1. Check if your session handling is working with this file:
http://www.phpjunkyard.com/extras/session_test.zip

2. Login to your MySQL administration (probably phpMyAdmin?) and see if you have any inserts in the "hesk_categories" database. Should be at least one category there.

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

Post by Klemen »

Also I never tested Hesk with PHP 5, but I don't think that is the issue.
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
yehey_mar

Post by yehey_mar »

Hi Klemen...

Thanks for your reply...

BTW, here is what I have for the tables:

mysql> show tables;
+-----------------+
| Tables_in_hesk |
+-----------------+
| hesk_categories |
| hesk_replies |
| hesk_tickets |
| hesk_users |
+-----------------+
4 rows in set (0.00 sec)


mysql> select * from hesk_users
-> ;
+----+---------------+------+---------+-----------+---------------------+----------------------------------------------------------------------+------------+--------+
| id | user | pass | isadmin | name | email | signature | categories | notify |
+----+---------------+------+---------+-----------+---------------------+----------------------------------------------------------------------+------------+--------+
| 1 | Administrator | admin | 1 | Your name | you@yourwebsite.com | Best regards,

Your name
Your website
http://www.yourwebsite.com | | 1 |
+----+---------------+------+---------+-----------+---------------------+----------------------------------------------------------------------+------------+--------+
1 row in set (0.01 sec)


The session_test.php resulted in the output:
Session started successfully!

If I type in the wrong password, I get the wrong password information and gives me back the admin.php page. If I type in the correct password, it says:
"Login
Your session has expired, please login using the form below."

The same message appears from the Apache error log:

[client X.X.X.X] PHP Warning: Invalid argument supplied for foreach() in /data/hesk/inc/common.inc.php on line 180, referer: http://X.X.X.X:8181/admin.php


Please help! Thanks in advance!
Klemen
Site Admin
Posts: 10141
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

What do you get for

mysql> select * from hesk_categories

?

What kind of server/OS are you on?
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
yehey_mar

Post by yehey_mar »

Hi Klemen...

Sorry I forgot to add the hesk_categories table: Here it is:

mysql> select * from hesk_categories;
+----+---------+
| id | name |
+----+---------+
| 1 | Default |
+----+---------+
1 row in set (0.00 sec)


I am using the following:

OS: Solaris 9
Webserver: Apache 2.0.54

Thanks in advance!
Klemen
Site Admin
Posts: 10141
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Perhaps it could be because the OS? I have only tested Hesk on Unix and Windows?

Try manually adding another category into hesk_categories table, for example:

INSERT INTO hesk_categories (id, name) VALUES (2, 'test');

In the slight chance that it works after addin this make sure you always keep at least 2 categories in hesk.

Let me know.

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

Post by Klemen »

Nah, forget that, the error from the log file is just a Warning, the script isn't breaking because of that.

Seems like this must be an error with handling sessions.

Can you try installing PHP 4.3.13 and see if it works with that version for you?
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
yehey_mar

Post by yehey_mar »

Thanks!... I will try that.
Post Reply