Page 1 of 1

Database corruption...??

Posted: Fri Feb 27, 2009 6:06 am
by humpda
Script URL:
Version of script: 2
Hosting company:
URL of phpinfo.php: http://www.alexhillshs.eq.edu.au/helpdesk/phpinfo.php
URL of session_test.php: http://www.alexhillshs.eq.edu.au/helpde ... _test2.php
What terms did you try when SEARCHING for a solution:

Write your message below:

Hi
I updated to the latest version of hesk a few weeks ago and seem to be experiencing some corruption within the database. Essentially, users are submitting jobs and when I log into Admin to check them, some (not all) bring up text of old or complete jobs. I have gone into the SQL DB and can see the full text of the jobs in the database itself so know that the data is being entered. I am no SQL/PHP guru which is why I love this helpdesk so much (thanks heaps for all your work on it), so I not too sure where to start debugging this issue. Should I junk the database and create new tables? Thanks for your help.

Posted: Fri Feb 27, 2009 5:46 pm
by Klemen
Please go to the database again (probably using phpMyAdmin?) and try to execute this code:

Code: Select all

SELECT count( name ) AS number 
FROM `hesk_tickets` 
GROUP BY `trackid` 
ORDER BY number DESC 
LIMIT 10  
Then post what result you get. This will show if you are getting duplicate ticket IDs which would explain what's happening in your case.


Also I would recommend that you upgrade your PHP, you are running a very old version with many bugs. You should update to at least the latest PHP 4 release if not PHP 5.

Posted: Sat Feb 28, 2009 8:59 pm
by humpda
Hi
Thanks for the reply. Unfortunately I can't update php...I have no control on the version installed and am unable to move to another server....I have to host on this one ;-)

I posted the code into the SQL query and received the following...

Generated by: phpMyAdmin 2.8.0.1 / MySQL 4.1.18-standard-log
SQL query: SELECT count( name ) AS number FROM `hesk_tickets` GROUP BY `trackid` ORDER BY number DESC LIMIT 10;
Rows: 10
number
2
2
1
1
1
1
1
1
1
1

Is this what I needed to do?

Thanks

Posted: Sun Mar 01, 2009 9:53 am
by Klemen
Yes, you did correct but the problem is I gave yo uthe wrong code, sorry. Please try that again using this:

Code: Select all

SELECT trackid, count( trackid ) AS number
FROM `hesk_tickets` 
GROUP BY `trackid` 
ORDER BY number DESC 
LIMIT 10 
Sorry again!

Posted: Sun Mar 01, 2009 11:17 pm
by humpda
Hi
Don't apologise....I am just very grateful that you are helping me. It is much appreciated. Without the help you provide I would be in trouble, so a big thank you...

Posted the code and got this response...

********

Does this indicate the problem?

Cheers

Posted: Mon Mar 02, 2009 6:58 pm
by Klemen
Seems like you are getting duplicate ticket ID numbers. Try uploading this file instead of the original one and see if the problem stops:
http://www.phpjunkyard.com/extras/submit_ticket.zip