OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Problems trying to upgrade OJS 2.2.4 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.

Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby Celuloide » Fri May 31, 2013 9:52 am

Hi!
I am working locally to practice and after upgrade the live site. I run the correct upgrade script in the ojs folder and no errors shown, but then try to upgrade the database and none of both methods work for me:
- The "php tools/upgrade.php upgrade" print a database connection error
- The web interface change the database, work during about 5 minutes, but finally only get a blank page, no success messages. I checked database and it had change but when I turn installation On again in config file and restart OJS, all contents of the journal have gone and the system information says it remains in 2.2.4.

No SAFE mode, but I made a php.ini with max_execution_time 600
I've tried to upgrade with PHP 5.2 and 5.4 but it's the same.
Also tried to connect a fresh 2.4.2 installation to the supposed upgraded database, but same result.

I have no more ideas. Have you?
Thanks!
Celuloide
 
Posts: 30
Joined: Tue Feb 07, 2012 7:31 am

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby asmecher » Fri May 31, 2013 10:05 am

Hi Celuloide,

If the upgrade runs for 5 minutes and stops with a blank page, you've most likely hit an execution time limit. (These usually are listed in the system's PHP error log.) If you've increased that timeout but still see execution stop at 5 minutes, then you likely have to double-check your php.ini configuration change or restart your Apache service to make the change take effect.

The command-line upgrade is recommended (for the above reasons); what connection error do you get when you try that?

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

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby Celuloide » Sat Jun 01, 2013 2:58 am

asmecher wrote:Hi Celuloide,

If the upgrade runs for 5 minutes and stops with a blank page, you've most likely hit an execution time limit. (These usually are listed in the system's PHP error log.) If you've increased that timeout but still see execution stop at 5 minutes, then you likely have to double-check your php.ini configuration change or restart your Apache service to make the change take effect.

The command-line upgrade is recommended (for the above reasons); what connection error do you get when you try that?

Regards,
Alec Smecher
Public Knowledge Project Team


Thanks for answering
The error is <h1>Database connection failed!</h1>ojs2: Database connection failed!

PHP 5.3.15 with Suhosin-Patch (cli) (built: Aug 24 2012 17:45:44)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

;;;;;;;;;;;;;;;;;;;;;
; Database Settings ;
;;;;;;;;;;;;;;;;;;;;;

[database]

driver = mysql
host = localhost
username = (removed)
password = (removed)
name = (removed)

; Enable persistent connections
persistent = Off

; Enable database debug output (very verbose!)
debug = Off
Celuloide
 
Posts: 30
Joined: Tue Feb 07, 2012 7:31 am

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby asmecher » Mon Jun 03, 2013 10:58 am

Hi Celuloide,

I've removed the credentials from your post above -- please don't post passwords in a public forum, even if it's just internal database credentials.

If those credentials are working for the web-based upgrade but not the command-line upgrade, I wonder if there isn't either a) a different PHP configuration file for command-line vs. web-based operations; or b) some kind of SELinux policy (if you're using SELinux) preventing your command-line PHP from connecting to the database.

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

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby Celuloide » Tue Jun 04, 2013 3:02 am

Hi Alec, thanks for answering,
The more cats, the more mice... I work it around and try to upgrade over a test copy up in the server. Now, at the same point I crash with this error message:
Code: Select all
(uiserver):u00000000:/homepages/XX/d00000000/htdocs/ojsprueba > php tools/upgrade.php upgrade
X-Powered-By: PHP/4.4.9
Content-type: text/html

<br />
<b>Parse error</b>:  syntax error, unexpected '=', expecting ')' in <b>/homepages/46/d372308948/htdocs/ojsprueba/plugins/generic/backup/BackupPlugin.inc.php</b> on line <b>169</b><br />

Do you think it could be a problem with the hosting provider? It sounds a bit weird to me the PHP/4.4.9 reference, but I don't know if it refers to hosting or to the upgrade file configuration...

Regards,
Daniel Becerra
Celuloide
 
Posts: 30
Joined: Tue Feb 07, 2012 7:31 am

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby asmecher » Tue Jun 04, 2013 8:46 am

Hi Daniel,

You're getting that header because the PHP binary you're executing is indeed PHP 4.4.9, and it's the CGI binary (intended to be run by the web server), not the command-line binary (intended for command-line execution). You'll need at least PHP 5.x, and better to use the command-line binary if you can find it. (It's possible that several versions are installed on the server; you may need to specify "/path/to/php" rather than just "php" (where /path/to/ is the correct path to the PHP5 binary).

That syntax error may be popping up because of a PHP4 incompatibility; if you can get PHP5 going, try it again, and if you get the same message we can track it further.

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

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby Celuloide » Tue Jun 04, 2013 11:43 am

Hi Alec,
Hosting provider tell me it is NO possible to change the PHP version of Apache, so the only thing I can do is to use an .htaccess file to change the PHP version in the OJS folder. It is weird because the global PHP configuration of the service is set up in 5.2 but throught ssh it shows PHP 4.4.9.
So I created a .htaccess with the code
Code: Select all
AddHandler application/x-httpd-php52 .php .php5 .php4 .php3
but I get the same result.

Time to try again with local server or time to look for another hosting provider?
I think I don't use SELinux and don't think either that there is a different PHP configuration between file for command-line and web-based, I only do what documentation says... :?

Thank you!
Daniel
Celuloide
 
Posts: 30
Joined: Tue Feb 07, 2012 7:31 am

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby asmecher » Tue Jun 04, 2013 11:50 am

Hi Daniel,

As I noted above: it's possible that several versions are installed on the server; you may need to specify "/path/to/php" rather than just "php" (where /path/to/ is the correct path to the PHP5 binary). Unfortunately I can't give you any more details than that, because it'll depend on your server's specifics.

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

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby Celuloide » Tue Jun 04, 2013 12:13 pm

Yes Alec, for my hosting provider it is
Code: Select all
/usr/bin/php tools/upgrade.php upgrade
But I get the same result. It is frustrating...
Celuloide
 
Posts: 30
Joined: Tue Feb 07, 2012 7:31 am

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby asmecher » Tue Jun 04, 2013 12:28 pm

Hi Daniel,

Yes, plain "php" and the more specific "/usr/bin/php" are almost certainly equivalent. However, there are almost certainly others, if your web-based PHP is PHP 5.x...

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

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby Celuloide » Tue Jun 04, 2013 1:05 pm

Yes, I tried them all...
Code: Select all
/homepages > whereis php
php: /usr/bin/php /usr/lib/php /usr/lib/php.ini /usr/lib/php.ini-nourl /usr/local/bin/php /usr/local/lib/php.ini-nourl /usr/include/php /usr/local/php /usr/share/php

:roll: But nothing...

Regards,
Daniel
Celuloide
 
Posts: 30
Joined: Tue Feb 07, 2012 7:31 am

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby Celuloide » Wed Jun 05, 2013 5:23 am

Hi Alec,
I finally achieved to run upgrade.php in local server by specifing the hole path to PHP binary, but I have a new issue:
Code: Select all
ojs2: DB Error: Duplicate entry 'interest-4096-514' for key 'controlled_vocab_symbolic'

Database is changed but the journal doesn't apperar. I assume process isn't complete.

Do you know witch can be the reason of this new problem?

UPDATE:
Tried with a different PHP version (PHP 5.4.10 this time) but same result. I appears when the script is executing the comand:
Code: Select all
[code: Installer Installer::migrateReviewingInterests]
<h1>DB Error: Duplicate entry 'interest-4096-514' for key 'controlled_vocab_symbolic'</h1>
MacBook-Pro-de-Daniel-Becerra-Jimenez:ojsupgrade danielbecerra$


Thanks!
Daniel
Celuloide
 
Posts: 30
Joined: Tue Feb 07, 2012 7:31 am

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby asmecher » Wed Jun 05, 2013 10:07 am

Hi Daniel,

Are you trying to upgrade on a clean installation, or is this the same database that failed the web-based upgrade earlier? If it's a failed upgrade, your database will be in an inconsistent state somewhere between the two versions; you'll need to restore from backup first.

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

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby Celuloide » Wed Jun 05, 2013 12:22 pm

Hi Alec,
Of course, each time I give it a try I've restored the database backup with version 2.2.4

Is it normal to be so difficult to upgrade? Does it improve in lastest versions?

Regards,
Daniel
Celuloide
 
Posts: 30
Joined: Tue Feb 07, 2012 7:31 am

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby asmecher » Wed Jun 05, 2013 12:55 pm

Hi Daniel,

When you reload your database from backup, is it possible that you're leaving some tables in place from the failed upgrade? In particular, once you've restored from backup, are there tables named controlled_vocabs, controlled_vocab_entries, and controlled_vocab_entry_settings? If so, you need to drop those tables before you run the upgrade -- if they're lying around from a failed upgrade they will cause problems.

Most of what you're running into are platform issues; the database error you're quoting is the first issue that's actually involved OJS. That said, an upgrade from 2.2.4 is a pretty major upgrade so you're more likely to run into headaches than you would be if you were only crossing one major line of releases (e.g. 2.2.x to 2.3.x or 2.3.x to 2.4.x).

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

Next

Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron