After upgrade to 2.02 and PHP 5.6 No login possible

Having trouble installing serendipity?
Post Reply
DF9CY
Posts: 3
Joined: Thu Oct 15, 2015 7:31 pm

After upgrade to 2.02 and PHP 5.6 No login possible

Post by DF9CY » Thu Oct 15, 2015 7:45 pm

Hi friends

Since 2009 I am using Serendipity (V 1.4.1) and PHP4. Now I upgraded my website to 2.02 and the PHP Version using (at webhoster 1&1 in Germany) is 5.6 now. Yesterday I updated as described in the helpfiles and the forum here. Everything went easy, but when I wanted to log in it did not work. So I made a fixlogin.php file like this:

Code: Select all

<?php
$username = 'aaaaaaa';
$password = "XXXX66yyyy";
include 'serendipity_config.inc.php';
echo serendipity_db_query("UPDATE {$serendipity['dbPrefix']}authors SET password = '" . serendipity_hash($password) . "' WHERE username = '" . $username . "'");
echo "Password changed.";
?>
It executes without errors. But it does not help in any case.
What is going wrong? All versions seem to be OK, the database seems to be updated. Most of the site is well visible. I may have forgot to update some of the plugins before I have started. Some are there some not.
Any help would be appreciated.
Greetings Christoph

BTW: I read everything here up and down, but I did not find a solution ...

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: After upgrade to 2.02 and PHP 5.6 No login possible

Post by Timbalu » Thu Oct 15, 2015 8:04 pm

DF9CY wrote:Most of the site is well visible. I may have forgot to update some of the plugins before I have started. Some are there some not.
For a solution you need to know and find the real issue.

Give us a public URL, please.

And please try this one:

Code: Select all

<?php
$username = "Benutzer";
$password = "Passwort";
include 'serendipity_config.inc.php';
echo serendipity_db_query("UPDATE {$serendipity['dbPrefix']}authors SET password = '" . serendipity_hash($password) . "', hashtype=1 WHERE username = '" . serendipity_db_escape_string($username) . "'");
echo "Password changed.";
?>
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

DF9CY
Posts: 3
Joined: Thu Oct 15, 2015 7:31 pm

Re: After upgrade to 2.02 and PHP 5.6 No login possible

Post by DF9CY » Fri Oct 16, 2015 6:11 am

Thanks Ian,

OK, I have tried that already as an alternative. It does not work and gives me an error message like: hashtype not in list.

For an impression on what is (not) going on look at http://www.df9cy.de

'til later
Christoph

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: After upgrade to 2.02 and PHP 5.6 No login possible

Post by Timbalu » Fri Oct 16, 2015 9:57 am

But this gives you a definite hint where your actual problem lives. Please read:
http://board.s9y.org/viewtopic.php?f=10 ... #p10434519 which talks about to update the database by hand via phpmyadmin or adminer, or such tool.

Code: Select all

    ALTER TABLE {PREFIX}authors ADD COLUMN hashtype int(1);
    ALTER TABLE {PREFIX}authors CHANGE password password VARCHAR(64) NOT NULL;
(replacing {PREFIX} with your prefix, eg "serendipity_", as used in all other serendipity database tables!)
Then the fixlogin.php should run through. Please note: This is a script that updates the admin, set in this table before. You have to name it to the same $username as it was originally, to overwrite the administrator table row used before!

If still in need for other tasks, you could run the upgrade from 1.1.4 again, resetting to this version in the serendipity_config_local.inc.php file.

If this does not fix all your problems, you will need to run the upgrade again as well for the missing plugins, that are erroneous on your frontend.
These are missing a migration function that is build-in. Revert your Serendipity version in the serendipity_config_local.inc.php file to "2.0-alpha2" and run the upgrader again. Allow to proceed any automatted upgrade task.

PS. For any in need!
Please do not use the first mentioned version of fixlogin, without the hashtype. As you can see, there are some old threads in this forum, which do not point to the correct version like above!
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

DF9CY
Posts: 3
Joined: Thu Oct 15, 2015 7:31 pm

Re: After upgrade to 2.02 and PHP 5.6 No login possible

Post by DF9CY » Mon Oct 19, 2015 9:46 pm

OK Ian,

:D :D :D
A very big thanks for you. It took me another 20 minutes or so this evening and everything seems to be running fine again.

Greetings
Christoph

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: After upgrade to 2.02 and PHP 5.6 No login possible

Post by Timbalu » Tue Oct 20, 2015 9:09 am

Great! :) And never again wait soo long to upgrade, else you'll miss all the improvements and fixes a system developed on an ongoing basis can give you.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

Post Reply