OJS: log-in problem after upgrade to 2.4.7-1

Hi there!
I am experiencing log-in problems after upgrading OJS from version 2.4.5 to 2.4.7-1

  • I copied unpacked the archive and copied the files over the old version
  • Put old config file back and added new settings
  • It’s not a matter of changing md5 to sha1 or the other way around
  • At first there was no problem with log-in with remembered admin account
  • Log-in failed with newly created account or and with other accounts
  • I expired all users in OJS and now cannot log-in with any account. It always says “Invalid username or password. Please try again.”
  • I did change the session_cookie_name in the config to no avail
  • I tried with different browsers (FF, IE, Chrome)
  • Deleted all cookies etc

Any help is highly appreciated!

Thanks,

Best,

Simon

Hi @simonbakker,

Did you perform the database upgrade step of the upgrade process?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Yes, I did. At first I had a problem though with a DOIExportPlugin.inc.php (I got a server 500 error and after consulting the error log I found this: stderr: PHP Fatal error: Class ‘DOIExportPlugin’ not found in…). I thought I fixed it (by coping it to the server), but your question made me second guess. So I checked the error log again. Saw some other errors. Today, I restored a backup and reinstalled the update, but this time with unpacking the installation file on the server instead of on my local computer and then uploading. After updating the DB everything now seems to be in order. Thanks for your help!

Kind regards,

Simon

Dear Alec,
I encountered the similar problem, and cannot log-in after the upgrade to OJS2.4.7-1. My upgrading process was smoothing (except a fix on file permission), and was “successful”. The only thing I did not do is the application of the Patches. The login failure error message is the same "Invalid username or password. Please try again. "
What could be the problem?
Best regards, GR

Hi @liugr,

Can you check the length of the password column in the users table in your database?

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks, Alec,
When I invoke mysql, I got the following message. Something is wrong.
ERROR 1045 (28000): Access denied for user ‘liugr’@‘localhost’ (using password: NO)
Best, GR

Hi @liugr,

MySQL is telling you that the credentials you supplied aren’t correct. Check them against the ones OJS uses in its config.inc.php configuration file.

Regards,
Alec Smecher
Public Knowledge Project Team

The password for mysql and that in config.inc.php should much, because it was set 2 year ago when the database was created. I never changed it. How the upgrade cause a change to the password in the mysql? If I cannot get in mysql, how I can change the password?
Many thanks for your help, GR

Hi @liugr,

The upgrade doesn’t change the MySQL password. If OJS is still working, then the password in your config.inc.php is still correct.

Regards,
Alec Smecher
Public Knowledge Project Team

I found the length is 41 41-byte.
Many thanks and best regards, GR

Hi, Alec,
I, as the OJS administrator, still cannot log in. However, other users can log in. Could you please let me know what could possibly go wrong? The length of the password column is 41 bytes.
Best, GR

Hi @liugr,

This suggests an upgrade problem to me. Either the database descriptor you’re using is not the one from OJS 2.4.7-1 – see this line – or the database upgrade process didn’t extend the column from its old length (40 characters) to the new longer one.

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you so much, Alec.
What should I do now to resolve this? I tried to go back to 2.4.6, but it also does not allow me to log in…
Could you please guide me overcome this?
Best regards, GR

Hi @liugr,

Do you know what happened to the upgrade? For example, does your database descriptor (lib/pkp/xml/schema/common.xml) specify 255 characters for the password column in the users table?

Regards,
Alec Smecher
Public Knowledge Project Team

Thank, Alec,
No. I do not know about these details. I only followed the Readme and performed the upgrade step by step. The only thing I did not do was the application of patches. I tried also using “Web” to perform the last step of installation as per the README, but it give me the following error, could not be done.
“DB Error: Duplicate entry ‘liugr’ for key ‘users_username’”.
Now some of my OCS (not ojs) users has start to telling me the log-in problem…
Please guide me to overcome this. I need a step-by-step guidance (sorry for my incompetence, and I worry a lot now…)
Best regards, GR.

Hi @liugr,

Can you look at lib/pkp/xml/schema/common.xml on your server, find the definition of the users table, and check the length of the password column? It should look like:

<field name="password" type="C2" size="255">

This will help determine whether the code is wrong, or the database is wrong.

Is your OJS installation connected in any way with your OCS installation? I don’t know how changing one could affect the other.

Regards,
Alec Smecher
Public Knowledge Project Team

Dear Alec,
Thanks. Yes. The line read
nn

I believe my ojs and ocs is separated. They are installed in difference folders. The database name is also different. I did not do any upgrade for ocs recently.
Best, GR

Sorry the line I copied did not shown in my message just sent to you. It is exactly the same as in your email.

Hi @liugr,

In that case, the database upgrade didn’t succeed.

Restore from a backup taken before the upgrade was attempted, and then try again. From the message you quoted above (“Duplicate entry ‘liugr’ for key ‘users_username’”), I wonder if you hit the “Install” button rather than the “Upgrade” button on the form.

I don’t think this is at all related to the OCS problem – let’s try to solve them separately.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi All -

I’m an OJS newbie, I installed 2.7.1 extracted from ojs-2.4.7-1.tar.gz on the webhost server (bluehost.com). I set up a new science journal and it was working fine for two or three days.

Suddenly I couldn’t log in. I reset my password 3 or 4 times, and the password reset worked but I still couldn’t log in. If I entered the wrong user name it returned an appropriate error message. When I entered my username and password correctly the OJS login processed for a second or two, blinked, and returned to the login page again, both fields blank, no error message, and of course no access. I’m the only user on the system, so I can’t have anyone else try it. Fortunately I hadn’t entered much yet, so recovery will be easy.

I would venture that this isn’t an upgrade problem from a previous version, it’s a 2.7.1 problem.

I deleted the entire installation and was about to try re-installing from scratch but I guess I won’t. Would it be better to try installing the previous version and add the upgrade when 2.7.1 has been fixed? Anyway, I’m happy to hear that it’s a (somewhat) known bug, and I look forward to moving ahead with OJS, which seems like a great program!

Thanks to the OJS project folks for great work (bugs are to be expected - if you don’t have bugs, you don’t have software)!

Cheers!

Adam