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
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

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: 910
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: 4191
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: 10015
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: 55
Joined: Wed Nov 25, 2009 12:23 pm

Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 3 guests