OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Upgrade instructions

Are you an Editor, Author, or Journal Manager in need of help? Want to talk to us about workflow issues? This is your forum.

Moderators: jmacgreg, michael, vgabler, John

Forum rules
This forum is meant for general questions about the usability of OJS from an everyday user's perspective: journal managers, authors, and editors are welcome to post questions here, as are librarians and other support staff. We welcome general questions about the role of OJS and how the workflow works, as well as specific function- or user-related questions.

What to do if you have general, workflow or usability questions about OJS:

1. Read the documentation. We've written documentation to cover from OJS basics to system administration and code development, and we encourage you to read it.

2. take a look at the tutorials. We will continue to add tutorials covering OJS basics as time goes on.

3. Post a question. Questions are always welcome here, but if it's a technical question you should probably post to the OJS Technical Support subforum; if you have a development question, try the OJS Development subforum.

Upgrade instructions

Postby osborne » Fri Jun 18, 2004 11:39 am

The upgrade instructions for 1.1.7 say

"Decompress the archive to your HTML documents directory. (e.g., "tar -zxf
ojs-1.0.tar.gz"), ..."

But I need to force tar to overwrite the existing files, don't I? (I get errors if I try to execute tar -zxf ojs-1.1.7.tar.gz, saying that some of the files exist.)

"... and replace all files in your old OJS directory with those
included in this archive "

What does the "and ..." mean? Shouldn't the tar operation do the replacement?

"(be sure to keep any uploaded files, such as images or directories with uploaded papers, etc.). Be sure to keep your current version
of include/db.php, as that contains your database connection settings."

OK---so I should rename the existing include/db.php and then, after the tar operation, name it back to db.php, right?

Because the tar failed, I renamed the existing directory and then executed tar, then copied my db.php into the new directory. But upgrade.php doesn't work (probably because there are other settings in another of my files that I should copy over?).

On a related point, the tar operation when I installed the system originally made the base directory ojs, whereas the instructions (e.g. step 3 of the upgrade instructions) suggest that the name is journal. Or maybe the name is supposed to be the name of the journal that I choose. Do you intend that I run tar, then rename the ojs directory to something else?

Sorry for not being able to figure all this out ...
osborne
 
Posts: 77
Joined: Mon Jun 07, 2004 1:24 pm
Location: Toronto, Canada

Postby kevin » Sat Jun 19, 2004 12:18 am

Sorry, the upgrade instructions could definitely be a lot clearer.

Here is the procedure I would suggest:

1. In an isolated directory, decompress the archive.

2. Copy include/db.php from the old site directory to the new OJS directory (if you're using a really old version of OJS it's possible you may have to instead modify the new include/db.php with the correct database connection settings [or use install.php], but that file hasn't changed in about a year so that won't be necessary in most cases).

3. Copy any custom files from the old directory. This would include images/articleimages/*, images/custom/*, and possibly your journal files directory if you happened to create that under the site directory. Be sure to preserve/reassign permissions so that those files/directories are still writeable by the webserver.

4. Move/rename your old site directory, replacing it with the new one.

5. Load http://yoursite.com/ojs/upgrade.php in a browser, and run the database upgrade for your old version.

6. Delete install.php, upgrade.php, and xmlimport.php


The database upgrade script hasn't been tested very much (other than 1.1.5-1.1.7 and 1.1.6-1.1.7) so feel free to email us if it fails (if it's failing on the database upgrade you may want to edit upgrade.php and comment out the database query statements until you find where it is failing).
kevin
 
Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

Upgrade instructions

Postby osborne » Sat Jun 19, 2004 12:39 pm

1. In an isolated directory, decompress the archive.


What do you mean by "isolated"? They key point seems to be that it must be a directory that doesn't have a subdirectory called "ojs", especially not one with a current OJS installation in it. Is that right?

2. Copy include/db.php from the old site directory to the new OJS directory


OK---I did that.

3. Copy any custom files from the old directory.


I don't have any.

4. Move/rename your old site directory, replacing it with the new one.


So now I have a tree off htdocs starting with ojs, containing the files in the new distribution together with the file include/db.php from my old installation. The tree containing the old installation starts with the directory ojs.1.1.6

5. Load http://yoursite.com/ojs/upgrade.php in a browser, and run the database upgrade for your old version.


Now here's the problem: that gets me lots of warnings from PHP, starting with
Code: Select all
Warning: Failed opening 'locale/en/user.inc.php' for inclusion (include_path='/home/ecowww/php_include:/home/ecowww/php_include/jpgraph:/home1/htdocs/mrbs') in /home1/htdocs/ojs/include/locale.inc.php on line 67

What did I do wrong? (Seems like I need to copy over some more files from the old installation.)
osborne
 
Posts: 77
Joined: Mon Jun 07, 2004 1:24 pm
Location: Toronto, Canada

Re: Upgrade instructions

Postby kevin » Sat Jun 19, 2004 2:06 pm

They key point seems to be that it must be a directory that doesn't have a subdirectory called "ojs", especially not one with a current OJS installation in it. Is that right?


Yes, that is correct.

Now here's the problem: that gets me lots of warnings from PHP, starting with
Code: Select all
Warning: Failed opening 'locale/en/user.inc.php' for inclusion (include_path='/home/ecowww/php_include:/home/ecowww/php_include/jpgraph:/home1/htdocs/mrbs') in /home1/htdocs/ojs/include/locale.inc.php on line 67

What did I do wrong? (Seems like I need to copy over some more files from the old installation.)


Adding "." to the PHP "include_path" setting (or using the default value of this setting) should resolve that problem. Alternatively, you can try this patch:

Code: Select all
diff -u -u -r1.37 upgrade.php
--- upgrade.php 11 Jun 2004 08:03:26 -0000      1.37
+++ upgrade.php 19 Jun 2004 21:04:44 -0000
@@ -58,6 +58,17 @@
 }
 
 
+// so PHP < 4.1.0 can find include files
+if (!defined('ENV_SEPARATOR')) {
+       define('ENV_SEPARATOR', strtolower(substr(PHP_OS, 0, 3)) == 'win' ? ';' : ':');
+}
+ini_set("include_path",  dirname(__FILE__) . ENV_SEPARATOR . ini_get("include_path"));
+
+
+// determine full path
+$fullpath = dirname(__FILE__) . "/";
+
+
 // include common functions
 require("include/functions.inc.php");
kevin
 
Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

Upgrading

Postby osborne » Sat Jun 19, 2004 2:49 pm

Thanks---the patch eliminates some of the errors, but I still get
Code: Select all
Warning: Supplied argument is not a valid MySQL-Link resource in /home1/htdocs/ojs/include/db/db.mysql.inc.php on line 58

repeatedly (four times, three before the text of the upgrade page and once after it).
osborne
 
Posts: 77
Joined: Mon Jun 07, 2004 1:24 pm
Location: Toronto, Canada

Postby kevin » Sat Jun 19, 2004 4:01 pm

Sounds like your database connection settings in include/db.php are not correct. If you edit include/db/db.mysql.inc.php and remove the "@" characters (e.g., changing "@mysql_pconnect" to "mysql_pconnect") you may get some more informative error output regarding why the database connection failed.

What version of OJS are you trying to upgrade from? If you're using a really old version of OJS copying db.php may not work.
kevin
 
Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

Postby osborne » Sun Jun 20, 2004 10:56 am

What version of OJS are you trying to upgrade from?


1.1.6

Sounds like your database connection settings in include/db.php are not correct.


include/db.php is the one I was using under 1.1.6.

If you edit include/db/db.mysql.inc.php and remove the "@" characters (e.g., changing "@mysql_pconnect" to "mysql_pconnect") you may get some more informative error output regarding why the database connection failed.


I get
Code: Select all
Warning: Access denied for user: 'root@localhost' (Using password: NO) in /home1/htdocs/ojs/include/db/db.mysql.inc.php on line 38
osborne
 
Posts: 77
Joined: Mon Jun 07, 2004 1:24 pm
Location: Toronto, Canada

Postby kevin » Sun Jun 20, 2004 12:14 pm

Are you sure you overwrote include/db.php in the new OJS with include/db.php from the old OJS? User "root" with no password are the database connection settings in the default include/db.php
kevin
 
Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

Postby osborne » Sun Jun 20, 2004 1:05 pm

kevin wrote:Are you sure you overwrote include/db.php in the new OJS with include/db.php from the old OJS?


Well, that's definitely what I intended to do ... but it seems I must have made a mistake (can't quite figure out what I did) ... sorry for the problems. In any case ... db.php needs to know the variables in the db_config array, right? Filling them in reduces the errors to a single warning, namely
Code: Select all
Warning: Supplied argument is not a valid MySQL result resource in /home1/htdocs/ojs/include/db/db.mysql.inc.php on line 63

Is there something else I should tell db.php?
osborne
 
Posts: 77
Joined: Mon Jun 07, 2004 1:24 pm
Location: Toronto, Canada

Postby kevin » Sun Jun 20, 2004 3:46 pm

You should be able to ignore that warning and just run the upgrade. The warning should go away once the upgrade script has been run.
kevin
 
Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

Postby osborne » Mon Jun 21, 2004 9:09 am

Thanks---that gets me to the main journal page without any errors. But at the top of the submissions page (submissions.php), I still get
Code: Select all
Warning: Supplied argument is not a valid MySQL result resource in /home1/htdocs/ojs/include/db/db.mysql.inc.php on line 63

As far as I can see, every other page is fine---this is the only one that generates a warning.
osborne
 
Posts: 77
Joined: Mon Jun 07, 2004 1:24 pm
Location: Toronto, Canada

Postby kevin » Mon Jun 21, 2004 8:26 pm

Thanks for pointing that out. You can delete these two lines from that file:

Code: Select all
diff -u -r1.275 submissions.php
--- admin/editor/submissions.php        17 Feb 2004 03:29:41 -0000      1.275
+++ admin/editor/submissions.php        22 Jun 2004 03:26:16 -0000
@@ -272,9 +272,6 @@
        $articlequery = $db->query($articlequery);
        $num = $db->num_rows($articlequery);
 
-
-       $issuequery = $db->query($issuequery);
-       $numissuequery = $db->num_rows($issuequery);
 
        $result = $db->query($fullquery);
        $row = $db->assoc_array($result);
kevin
 
Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm


Return to OJS Editorial Support and Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests

cron