OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Migration Errors

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.

Migration Errors

Postby ramon » Mon Jan 29, 2007 12:06 pm

Dear All OJSers,

Anyone ran into this problem while migrating via shell:

php migrate.php dj /var/www/discursojuridico importSubscriptions
PHP Notice: Undefined index: SCRIPT_NAME in /var/www/revistateste/classes/core/Request.inc.php on line 100
PHP Notice: Undefined index: host in /var/www/revistateste/classes/site/ImportOJS1.inc.php on line 162
PHP Notice: Undefined index: uname in /var/www/revistateste/classes/site/ImportOJS1.inc.php on line 162
PHP Notice: Undefined index: password in /var/www/revistateste/classes/site/ImportOJS1.inc.php on line 162
PHP Notice: Undefined index: name in /var/www/revistateste/classes/site/ImportOJS1.inc.php on line 162
Content-type: text/html
X-Powered-By: PHP/4.3.11

Import failed!
ERROR: Database connection error:

OR this problem:
DB Error: Table 'discursojuridico.journals' doesn't exist
DB Error: Table 'discursojuridico.sessions' doesn't exist

The version 1.x has been disabled (no db access).

We have successfully migrated 2 journals, but the other 2 are giving out these errors.

PS: What is the command to run the charset conversion via shell??
ramon
 
Posts: 927
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Postby asmecher » Tue Jan 30, 2007 10:42 am

Hi Ramón,

Generally, if you have database connection problems or missing OJS2 tables, it means that the OJS 1 configuration file is creating a database connection that is interfering with OJS 2's connection. The configuration file should set configuration variables, but it shouldn't connect to the database. If you're sure that it's not happening in OJS 1's db.php, check to see if any PHP scripts included from there are creating a connection.

(PS. Use the "transcode" option to migrate.php to change the character set.)

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Migration Errors continued - Connection Failed

Postby ramon » Wed Jan 31, 2007 10:42 am

Alec,

I'm helping a journal migrate about 4 journals to version 2.1.1. I managed to import one, but the others keep throwing either the error mentioned before, or if I disable their include/db.php a connection error.
This is the command I executed.

php migrate.php pc /var/www/perspectivascontemporaneas/ importSubscriptions

This is the error it throws:
PHP Notice: Undefined index: SCRIPT_NAME in /var/www/revistateste/classes/core/Request.inc.php on line 100
Content-type: text/html
X-Powered-By: PHP/4.3.11

Import failed!
ERROR: Database connection error:

Any ideas?
ramon
 
Posts: 927
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Migration Errors resolved - Persistent Connection

Postby ramon » Wed Jan 31, 2007 11:04 am

Alec,

Just figured out what it was.

Before migrating any OJS1 journal, edit ojs/include/db.php to allow persistent connections:

// Set to 1 to enable persistent connections, 0 to disable
$db_config[pconnect] = 1;

Persistent connections are used to allow multiple systems to use one single connection, which is not safe for web systems.
Why? Because if your MySQL password is hacked all systems are compromised.
Why use persisten connections? Because they are faster, as long as all systems are using the same connection. Otherwise, if more connections are opened than allowed by MySQL configuration, it will crash.
ramon
 
Posts: 927
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil


Return to OJS Technical Support

Who is online

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