You are viewing the PKP Support Forum | PKP Home Wiki

Cannot login after migrating to other server

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.

Cannot login after migrating to other server

Postby mariust » Mon Sep 12, 2011 6:06 am

I have manually migrated OJS to other server. But after that, nobody can login. By the way, I get no message saying that password or username is not correct.
Posts: 1
Joined: Mon Sep 12, 2011 6:02 am

Re: Cannot login after migrating to other server

Postby JasonNugent » Thu Sep 15, 2011 1:55 am

Hi mariust,

Did you move to a completely new domain? Have you tried enabling the display of errors in order to see if anything there shows up? Try changing this in your config.inc.php:

Code: Select all
display_errors = On

And see how that goes. Also, check your server logs for any PHP errors or warnings.


Site Admin
Posts: 894
Joined: Tue Jan 10, 2006 6:20 am

Re: Cannot login after migrating to other server

Postby jmacgreg » Fri Sep 16, 2011 12:26 pm

Hi Mariust,

In addition to Jason's notes, make sure that your encryption settings in your migrated config.inc.php file match what you had previously -- this parameter controls how OJS en/decodes passwords, and if it doesn't match what you had previously, no-one's passwords will work.

Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Cannot login after migrating to other server

Postby jtickle » Tue Sep 20, 2011 8:14 am

I just frantically spent my entire morning solving a similar problem. We moved from RHEL5 (php 5.1) to RHEL6 (php 5.3) a few days ago. This morning, I get a call from someone trying to log in, and we had the exact same problem: no error, but no login.

I can't figure out why this actually *works* for anyone. Take a look at the login function in classes/security/Validation.php. Notice that it sets up your user session all nicely, but it never actually saves the session!

I inserted the following code after line 110, and everything works now:

Code: Select all
$sessionDao =& DAORegistry::getDAO('SessionDAO');

I guess our line numbers could be different, so note that this goes right AFTER the "$userDao->updateObject($user)" line and right before the "return $user" line at the very end of the function.

OJS folks: this is a major bug!
Posts: 1
Joined: Tue Sep 20, 2011 7:56 am

Re: Cannot login after migrating to other server

Postby asmecher » Tue Sep 20, 2011 9:10 am

Hi jtickle,

The SessionDAO::updateObject function is invoked from the session save handler, which is configured in the constructor of the SessionManager object. Are you sure you aren't running into an intermittent problem with the session cookie, i.e. http://lib-pkp2.lib.sfu.ca/support/forum/viewtopic.php?p=2906#p2906?

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

Re: Cannot login after migrating to other server

Postby cwevans » Thu Sep 29, 2011 4:43 am

I had a similar problem. Every time I tried to log in, I was taken right back to the login page with no explanation. I deleted my OJS cookie and tried again. It worked.

Hope this helps.

C.W. Evans
Posts: 2
Joined: Thu Sep 29, 2011 4:40 am

Re: Cannot login after migrating to other server

Postby madriano » Mon Jun 10, 2013 11:56 am

For me, the problem occurs because the version of PHP. In /classes/db/DAO.inc.php, line 169, add "&& false" in if clause.

Posts: 52
Joined: Wed Nov 25, 2009 12:23 pm

Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest