OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



upgrade db error 2.3.8 to 2.4.2

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

upgrade db error 2.3.8 to 2.4.2

Postby bgnieves » Fri Nov 08, 2013 9:30 am

Hi

This is the error I having when using the command php tools/upgrade.php upgrade.

...
[data: dbscripts/xml/upgrade/2.4.0_update.xml]
ERROR: Upgrade failed: DB: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0 AND n.assoc_type = o.log_id' at line 1
bgnieves
 
Posts: 2
Joined: Fri Nov 08, 2013 8:57 am

Re: upgrade db error 2.3.8 to 2.4.2

Postby asmecher » Fri Nov 08, 2013 10:20 am

Hi bgnieves,

Can you log the complete SQL query that's being executed and post it here? To do that, restore your DB from backup, and just before executing the upgrade again, turn the "debug" setting in your config.inc.php to "On". This will cause all DB queries to be dumped as they're executed. The last or second-to-last one in the list should be the query in question.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9090
Joined: Wed Aug 10, 2005 12:56 pm

Re: upgrade db error 2.3.8 to 2.4.2

Postby bgnieves » Tue Nov 12, 2013 8:51 am

Hi Alec

I did it again and this is the error:

(mysql): INSERT INTO event_log (assoc_type, assoc_id, user_id, date_logged, ip_address, event_type, message, is_translated) SELECT log_id, article_id, user_id, date_logged, ip_address, event_type, message, 1 FROM article_event_log


(mysql): INSERT INTO event_log_settings (log_id, setting_name, setting_value, setting_type) SELECT log_id, 'old_log_id', assoc_type, 'int' FROM event_log


(mysql): INSERT INTO event_log_settings (log_id, setting_name, setting_value, setting_type) SELECT n.log_id, 'assoc_type', o.assoc_type, 'int' FROM event_log n, article_event_log o WHERE o.assoc_id IS NOT NULL AND o.assoc_id 0 AND n.assoc_type = o.log_id 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0 AND n.assoc_type = o.log_id' at line 1

ADOConnection._Execute(INSERT INTO event_log_settings (log_id, setting_name, setting_value, setting_type) SELECT n.log_id, 'assoc_type', o.assoc_type, ..., false) % line 864, file: adodb.inc.php

ADOConnection.Execute(INSERT INTO event_log_settings (log_id, setting_name, setting_value, setting_type) SELECT n.log_id, 'assoc_type', o.assoc_type, ...) % line 443, file: Installer.inc.php

Installer.executeSQL(INSERT INTO event_log_settings (log_id, setting_name, setting_value, setting_type) SELECT n.log_id, 'assoc_type', o.assoc_type, ...) % line 438, file: Installer.inc.php

Installer.executeSQL(Array[15]) % line 399, file: Installer.inc.php

Installer.executeAction(Array[3]) % line 268, file: Installer.inc.php

Thanks for your help.

Brenda Nieves
bgnieves
 
Posts: 2
Joined: Fri Nov 08, 2013 8:57 am

Re: upgrade db error 2.3.8 to 2.4.2

Postby asmecher » Tue Nov 12, 2013 11:12 am

Hi Brenda,

I suspect you're hitting the problem described here, which should be solvable by upgrading your libxml and/or PHP installation.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9090
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 5 guests