Page 1 of 1

Problem upgrading from 2.0 to 2.3

Posted: Fri Feb 03, 2012 2:49 pm
by iainlee
I can't provide diagnostic links because the server is only accessible on the internal network:
Output from the session_test.php is:
Session started successfully!
CLICK HERE FOR PAGE 2
$_SESSION['test'] is set to: TRUE


When trying to upgrade from 2.0 to 2.3, I go to the install folder but the web page doesn't load. I have these errors in the server log:

[Thu Feb 02 16:02:43 2012] [error] [client 10.50.48.76] PHP Notice: Undefined index: can_sel_lang in /var/www/html/tickets/inc/common.inc.php on line 623
[Thu Feb 02 16:02:43 2012] [error] [client 10.50.48.76] PHP Notice: Undefined index: languages in /var/www/html/tickets/inc/common.inc.php on line 655
[Thu Feb 02 16:02:43 2012] [error] [client 10.50.48.76] PHP Warning: require(../language//text.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /var/www/html/tickets/inc/common.inc.php on line 655
[Thu Feb 02 16:02:43 2012] [error] [client 10.50.48.76] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required '../language//text.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/tickets/inc/common.inc.php on line 655

Re: Problem upgrading from 2.0 to 2.3

Posted: Fri Feb 03, 2012 5:09 pm
by Klemen
Probably a corrupted settings file.

Try pasting this to the bottom of your "hesk_settings.inc.php" file:

Code: Select all

$hesk_settings['can_sel_lang']=0;
$hesk_settings['language']='English';
$hesk_settings['languages']=array(
'English' => array('folder'=>'en'),
);
If that doesn't work try backing up to 2.0 for now as I will not be able to reply to any further inquiries before 16th I'm afraid.

Re: Problem upgrading from 2.0 to 2.3

Posted: Thu Feb 09, 2012 8:26 am
by iainlee
Your suggestion worked but now I get an error at stage 4 of the install:

ERROR: hesk_kb_attachments table exists
Database table hesk_kb_attachments exists on the server, your Hesk had already been updated to version 2.3!

If I ignore the error, everything seems to work but submitting a ticket fails with:
Error:
Can't execute SQL

I would like to think that I restored everything back to version 2.0, including the database but now I'm not so sure. However, an old backup of the database, taken before my attempted upgrade, does have a hesk_kb_attachments table with no records in it.

Re: Problem upgrading from 2.0 to 2.3

Posted: Tue Feb 14, 2012 7:33 pm
by Klemen
Can you let me know exactly what HESK table names are inside your database?

Re: Problem upgrading from 2.0 to 2.3

Posted: Mon Feb 20, 2012 3:51 pm
by iainlee
There is another SQL error which I didn't notice before. Anyway, here are the tables before the upgrade:

mysql> show tables;
+---------------------+
| Tables_in_heskug |
+---------------------+
| hesk_attachments |
| hesk_categories |
| hesk_kb_articles |
| hesk_kb_attachments |
| hesk_kb_categories |
| hesk_mail |
| hesk_notes |
| hesk_replies |
| hesk_std_replies |
| hesk_tickets |
| hesk_users |
+---------------------+
11 rows in set (0.00 sec

When upgrading, the first error is:

Error:
Can't execute SQL: ALTER TABLE `hesk_tickets` ADD INDEX (`owner`)
MySQL said:
Key column 'owner' doesn't exist in table

I've looked at the original database and there is indeed no field "owner". If I try again to upgrade, then I get the error:
ERROR: hesk_kb_attachments table exists

The databse has been changed by the failed upgrade. It now looks like this:

mysql> show tables;
+---------------------+
| Tables_in_heskug |
+---------------------+
| hesk_attachments |
| hesk_categories |
| hesk_kb_articles |
| hesk_kb_attachments |
| hesk_kb_categories |
| hesk_logins |
| hesk_mail |
| hesk_notes |
| hesk_online |
| hesk_replies |
| hesk_std_replies |
| hesk_tickets |
| hesk_users |
+---------------------+
13 rows in set (0.00 sec)

Re: Problem upgrading from 2.0 to 2.3

Posted: Mon Feb 20, 2012 5:30 pm
by Klemen
Because of the failed update and new tables installed the update script actually wants to upgrade from a later version now, not 2.0.

You do have MySQL backup before the upgrade? Try deleting all tables, restoring backup before first update attempt (without any new tables) then try upgrading again.

If that doesn't work and you don't have much tickets/articles it might be best to do a clean install of 2.3 to make sure it's 100% working correctly.