OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



install script fails...

OCS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, michael

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page. While these are OJS-specific, the OCS codebase is similar enough to OJS they should be of help. There is also an [url=http://pkp.sfu.ca/ocs_documentation[/url]OCS Documentation[/url] page with some more general documentation that might also be of interest.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a technical support question, try the OCS Technical Support subforum.

install script fails...

Postby rcoss » Fri Oct 19, 2007 1:14 pm

Hi,

Using OCS fron CVS with db driver mysql.
Install script fails because doesn't create table currencies in db. Manual install also produces
an sql script *without* CREATE TABLE currencies and later tries to do some INSERT INTO currencies .

Thanks
rcoss
 
Posts: 3
Joined: Fri Oct 12, 2007 11:32 am

Re: install script fails...

Postby asmecher » Fri Oct 19, 2007 1:30 pm

Hi rcoss,

The CVS version of OCS is currently unstable; we'll be returning to it when OJS 2.2 is released, which should be shortly, after which it'll stabilize. I'd suggest sticking with version 2.0 for the moment.

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

Upgrade script fails (2.0.0-1 => CVS 2008-02-13)

Postby derekp » Mon Feb 18, 2008 3:13 pm

I tried upgrading from OCS 2.0.0-1 to CVS, and "php tools/upgrade.php upgrade" produces errors during the database migration. (I'm using PostgreSQL, which is probably much more stringent with data integrity checking than MySQL.) The attached patch addresses some of these errors.

In addition, the plugins attempt to insert their database entries again, failing due to duplicate keys. Plugin::register() registers a postInstall hook to call Plugin::installData() if the plugin has a data file, which is invoked by Installer::execute(). This is a tricker issue to fix.

Code: Select all
--- classes/install/Upgrade.inc.php.upgrade     2008-02-16 04:44:45.710393000 -0800
+++ classes/install/Upgrade.inc.php     2008-02-16 01:50:11.237051000 -0800
@@ -205,5 +205,5 @@

                foreach ($settingNames as $oldName => $newName) {
-                       $result =& $schedConfDao->retrieve('SELECT s.sched_conf_id, c.primary_locale FROM sched_confs s, conferences c, sched_conf_settings scs
WHERE c.conference_id = sc.conference_id AND sc.sched_conf_id = scs.sched_conf_id AND scs.setting_name = ? AND (scs.locale IS NULL OR scs.locale = ?)', array($oldName, ''));
+                       $result =& $schedConfDao->retrieve('SELECT sc.sched_conf_id, c.primary_locale FROM sched_confs sc, conferences c, sched_conf_settings scs WHERE c.conference_id = sc.conference_id AND sc.sched_conf_id = scs.sched_conf_id AND scs.setting_name = ? AND (scs.locale IS NULL OR scs.locale = ?)', array($oldName, ''));
                        while (!$result->EOF) {
                                $row = $result->GetRowAssoc(false);
@@ -226,8 +226,8 @@
                $conferenceDao =& DAORegistry::getDAO('ConferenceDAO');

-               $result =& $conferenceDao->retrieve('SELECT g.galley_id, c.primary_locale FROM conferences c, papers p, paper_galleys g WHERE p.conference_id =
c.conference_id AND g.paper_id = p.paper_id AND (g.locale IS NULL OR g.locale =
?)', '');
+               $result =& $conferenceDao->retrieve('SELECT g.galley_id, scs.locale FROM sched_conf_settings scs, papers p, paper_galleys g WHERE p.sched_conf_id = scs.sched_conf_id AND g.paper_id = p.paper_id AND (g.locale IS NULL OR g.locale = ?)', '');
                while (!$result->EOF) {
                        $row = $result->GetRowAssoc(false);
-                       $paperGalleyDao->update('UPDATE paper_galleys SET locale = ? WHERE galley_id = ?', array($row['primary_locale'], $row['galley_id']));
+                       $paperGalleyDao->update('UPDATE paper_galleys SET locale = ? WHERE galley_id = ?', array($row['locale'], $row['galley_id']));
                        $result->MoveNext();
                }
--- dbscripts/xml/upgrade/2.1.0_localize.xml.upgrade    2008-02-16 04:45:03.217620000 -0800
+++ dbscripts/xml/upgrade/2.1.0_localize.xml    2008-02-16 01:27:59.454165000 -0800
@@ -38,6 +38,6 @@
        <!-- Localize the sched_confs table -->
        <sql>
-               <query>INSERT INTO sched_conf_settings (sched_conf_id, conference_id, setting_name, setting_value, setting_type, locale) SELECT sc.sched_conf_id, sc.conference_id, 'title', title, 'string', c.primary_locale FROM conferences
c, sched_confs sc WHERE c.conference_id = sc.conference_id</query>
-               <query>INSERT INTO sched_conf_settings (sched_conf_id, conference_id, setting_name, setting_value, setting_type, locale) SELECT sc.sched_conf_id, sc.conference_id, 'description', description, 'string', c.primary_locale FROM
conferences c, sched_confs sc WHERE c.conference_id = sc.conference_id</query>
+               <query>INSERT INTO sched_conf_settings (sched_conf_id, setting_name, setting_value, setting_type, locale) SELECT sc.sched_conf_id, 'title', sc.title, 'string', c.primary_locale FROM conferences c, sched_confs sc WHERE c.conference_id = sc.conference_id</query>
+               <query>INSERT INTO sched_conf_settings (sched_conf_id, setting_name, setting_value, setting_type, locale) SELECT sc.sched_conf_id, 'description', sc.description, 'string', c.primary_locale FROM conferences c, sched_confs sc
WHERE c.conference_id = sc.conference_id</query>
        </sql>

--- dbscripts/xml/upgrade.xml.upgrade   2008-02-16 04:45:21.852180000 -0800
+++ dbscripts/xml/upgrade.xml   2008-02-16 01:08:50.611666000 -0800
@@ -16,6 +16,6 @@
        <!-- #2961: Stage 1 of 2.1 schema upgrade: Do not drop columns yet -->
        <upgrade minversion="2.0.0.0" maxversion="2.0.0.1">
-               <schema file="ocs_schema_stage1.xml" />
                <data file="upgrade/2.1.0_preupdate.xml" />
+               <schema file="ocs_schema_stage1.xml" />
                <code function="dropAllIndexes" />
        </upgrade>
@@ -23,6 +23,6 @@
        <!-- Upgrade to version 2.1.0 -->
        <upgrade minversion="2.0.0.0" maxversion="2.0.0.1">
-               <data file="upgrade/2.1.0_localize.xml" />
                <code function="setConferencePrimaryLocales" />
+               <data file="upgrade/2.1.0_localize.xml" />
                <code function="localizeConferenceSettings" />
                <code function="localizeSchedConfSettings" />
derekp
 
Posts: 16
Joined: Wed Oct 10, 2007 12:45 am
Location: University of British Columbia

Re: install script fails...

Postby asmecher » Tue Feb 19, 2008 10:17 am

Hi derekp,

Thanks -- FYI, the upgrade process from OCS 2.0 to what will be OCS 2.1 will not be tested or refined until the end of the release process, so you're in uncharted territory.

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

Re: install script fails...

Postby spatialguru » Wed Feb 20, 2008 3:57 pm

asmecher wrote:Thanks -- FYI, the upgrade process from OCS 2.0 to what will be OCS 2.1 will not be tested or refined until the end of the release process, so you're in uncharted territory.


Fair enough - do you have any suggested ways for upgrading the db in the meantime?

In case it helps later on, the upgrade process bailed for me here:
Code: Select all
...
(mysql): SHOW COLUMNS FROM site 
(mysql): ALTER TABLE site CHANGE COLUMN locale primary_locale 
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 '' at line 1
          adodb_mysql._execute(ALTER TABLE site CHANGE COLUMN locale primary_locale , false) % line  864, file: adodb.inc.php
        adodb_mysql.execute(ALTER TABLE site CHANGE COLUMN locale primary_locale ) % line  431, file: Installer.inc.php
      upgrade.executesql(ALTER TABLE site CHANGE COLUMN locale primary_locale ) % line  422, file: Installer.inc.php
    upgrade.executesql(Array[1]) % line  422, file: Installer.inc.php
  upgrade.executesql(Array[1]) % line  387, file: Installer.inc.php
spatialguru
 
Posts: 112
Joined: Mon Jun 25, 2007 1:23 pm
Location: British Columbia, Canada

Re: install script fails...

Postby mga » Mon Dec 14, 2009 4:43 pm

Hi

I had the problem when upgrading that OCS generated SQL problems. it eventually worked with the manual install but the generated SQL would not run 100%. I had to run it without many INSERTS (these were generating most of the errors). But since I "moved on", I cannot re-generate the manual install SQL. How can I go about this?

Thanks
mga
 
Posts: 24
Joined: Mon Oct 26, 2009 10:33 pm

Re: install script fails...

Postby mga » Mon Dec 14, 2009 9:06 pm

Hi

I think I solved the issue reloading the locale from the admin. I guess I may have lost some customizations but I guess thats OK.

Thanks
mga
 
Posts: 24
Joined: Mon Oct 26, 2009 10:33 pm


Return to OCS Development

Who is online

Users browsing this forum: Bing [Bot] and 0 guests

cron