Page 1 of 1

Duplicated Ticket ID's

Posted: Mon Sep 17, 2007 7:48 pm
by rooster
I am having a problem with ticket ID's being duplicated. When a user opens a ticket, it is using the last ticket ID that they opened for their new ticket ID. The subject of the ticket will change, but the body of the ticket remains that of the old ticket. I have been unable to reproduce this error, but somehow these nuts I administer have done it a couple of times! Has anyone ever seen this? Any suggestions?

Posted: Tue Sep 18, 2007 2:07 pm
by Klemen
What version of Hesk are you running and what is your server OS? Though rare it's been reported before, but didn't hear anything after version 0.94 when I change rand() to mt_rand() in generating the session ID.

Posted: Tue Sep 18, 2007 8:28 pm
by rooster
I'm running v 0.94, Win 2K3 SP2, MySQL 5.0, PHP 5.0.41... and I wear a size 9D boot! I think it has duplicated ticket #'s either 2 or 3 times. And if it helps any, it duplicates the ticket number to the same user each time. Ex. User A opens ticket # 1234, then it is resolved. 2 weeks later User A opens another ticket and it is assigned # 1234.

Posted: Wed Sep 19, 2007 6:44 pm
by andrew
Klemen Stirn wrote:What version of Hesk are you running and what is your server OS? Though rare it's been reported before, but didn't hear anything after version 0.94 when I change rand() to mt_rand() in generating the session ID.
My install is perfectly fine..
I wonder if it is limited to Windoze installs?

Posted: Thu Sep 20, 2007 2:06 pm
by Klemen
Well seems like only a very small percentage of Windows users experience this problem. Not sure what it is, will see if I can replicate the problem. Probably not before October though.

Posted: Mon Sep 24, 2007 1:21 pm
by OpheliaPayne
Hello. We to are using .94 as well.

Operating system Linux
MySQL version 4.1.22-standard
Apache version 1.3.37 (Unix)
PHP version 4.4.6

We just had a ticket number duplicated as well. The original ticket had been resolved. The new ticket was from a new user.

Unfortunately we can't this happening, it opens us up to having private information made public.

Posted: Wed Oct 03, 2007 6:24 am
by power
damn this is not good...its time to remove hesk >:

Posted: Wed Oct 03, 2007 6:24 am
by power
so this is not just for windows users....right ???

Posted: Wed Oct 03, 2007 11:44 am
by Klemen
Try this:
http://www.phpjunkyard.com/extras/unique_ID.zip

Exract the .php file inside, upload it to your server and open it in your browser like this (make sure ID is UPPERCASE not lowercase)
http://www.yourdomain.com/unique_ID.php

What does it say?

I tested it on my Linux server and several times on my Windows PC and not two identical IDs were generated with over 1.000.000 tested.

Hard to be of any help if I can't replciate the problem... Anyone of you willing to give me FTP access to your server so I can run some tests? I jsut need access to the Hesk folder or you can create a separate subdomain for me and give me access just there. If yes, please PM me.

Posted: Fri Oct 05, 2007 5:57 pm
by rooster
100000 generated IDs
100000 of them are unique.


Reloaded the page 5 times, got 500,000 unique ID's. But just had another duplicated ticket ID this morning displaying old ticket information in it. The only information that changes in the ticket is the Subject. I wish I was able to give you access to this server, but it is on our intranet and we are a financial institution and... well, you know. I can send you all the files you want if that will help?[/img]

Posted: Fri Oct 05, 2007 7:25 pm
by Klemen
No problem, your customer's privacy and security is of main concern, just though I'd ask. If you didn't make any changes to the files it's no use sending them over either.

I can't replicate this issue and it seems to be a very rare one. From the test you did I'd say generating ticket IDs is not the issue, could be something else.

A few more questions then if you don't mind. Some may sound stupid and obvious, but please stay with me as all answers are important. Please be as specific as possible:

a) you didn't make any changes to the submit_ticket.php file, did you?

b) how do you know the tracking ID is duplicated? Do you see two tickets with the same ID in your admin panel or what?

c) Can you see if the duplicated ticket looks the same from both admin panel (admin_ticket.php) and from USER panel (ticket.php)?

d) If you enter the tracking ID in the user panel (index.php) which ticket shows - the older or the newer one?

e) "Subject" is THE ONLY thing that changes? How about things like e-mail address, Created on, Last modified, IP address, ...?

f) In the NEWER ticket all the information (except Subject) is displayed from the OLDER ticket, or vice versa (old ticket shows info from the new one)?

g) If you reply to the OLDER ticket, does the reply show in both tickets or just older/newer? How about if you reply to the NEWER ticket?

h) any other detail you can think of?

Posted: Tue Oct 09, 2007 8:10 pm
by rooster
a) No sir, nothing has been changed in the submit_ticket.php file.

b) I see both tickets in the admin_main.php page, with the same ticket Tracking ID's. Ticket A was opened first with a Low priority. Ticket B was just opened up last week, with a different subject and priority level. Everything looks normal from the admin_main.php page except for duplicate ticket ID's. If you open ticket A, it has all of the original information in it. If you click on ticket B, it displays all of the information from ticket A, including Subject, Priority, Message, etc. So both tickets show the correct ticket information on the admin_main.php page but when you open ticket B, it displays ticket A's information.

c) In ticket.php, the information displayed is from Ticket A, (the first ticket that was opened up under this Tracking ID.)

d) The older ticket shows.

e) On admin_main.php, the Last update, Name, Subject, Status, Last replier, and Priority are different for both tickets. If you click on either ticket, you will get the older ticket information inside... subject, message, IP, email, etc. It appears that nothing from the newer ticket is being displayed.

f) see above.

g) if I reply to the older ticket, I see it in the older and the newer. If I reply to the newer ticket, I see it in both also.

That's about all I can think of at the moment. Will be more than happy to answer any questions or test anything you want.

Posted: Sun Oct 14, 2007 8:10 pm
by Klemen
No matter what I try, I can't replicate the problem :?

Try with this submit_ticket.php instead of the original one:
http://www.phpjunkyard.com/extras/submit_ticket.zip
Last 5 digits will be from the current timestamp, see if that helps and you don't get duplicated tickets anymore.

Do you know how to use phpMyAdmin? If yes, can you paste here the result you get for this SQL code:

Code: Select all

SELECT count( name ) AS number
FROM `hesk_tickets` 
GROUP BY `trackid` 
ORDER BY number DESC 
LIMIT 10 

Posted: Mon Oct 15, 2007 1:24 pm
by rooster
Sure makes troubleshooting fun when you can't replicate it huh? I renamed my old file and replaced it with this one, so we'll see what happens. Here are the results from the SQL query...

SQL result
Host: localhost
Database: helpdesk
Generation Time: Oct 15, 2007 at 08:19 AM
Generated by: phpMyAdmin 2.10.1 / MySQL 5.0.41-community-nt
SQL query: SELECT count( name ) AS number FROM `hesk_tickets` GROUP BY `trackid` ORDER BY number DESC LIMIT 10 ;
Rows: 10

number
2
1
1
1
1
1
1
1
1
1


That help any?

Posted: Mon Oct 15, 2007 7:54 pm
by Klemen
Yeah, it helped by letting me know the issue must be at the ticket submission time and is not related to any later activities (had to make sure). We'll see how the new submit ticket does.