Page 1 of 1

Login Problems

Posted: Tue Feb 23, 2010 2:46 pm
by System0
I'm having the same login problem as everyone else. It happened when I upgraded to 1.5.1. I never really looked into the matter much as I don't update the blog that often anymore though I now want to get it up and running.

I upgraded 1.5.2 as I thought it would add the hashtype column to the authors table, but it hasn't (my bad) :)

I executed the following SQL query via phpmyadmin:

Code: Select all

create table serendipity_tempauthors (
  realname varchar(255) NOT NULL default '',
  username varchar(32) default null,
  password varchar(64) default null,
  authorid {AUTOINCREMENT} {PRIMARY},
  mail_comments int(1) default '1',
  mail_trackbacks int(1) default '1',
  email varchar(128) not null default '',
  userlevel int(4) {UNSIGNED} not null default '0',
  right_publish int(1) default '1',
  hashtype int(1) default '0'
) {UTF_8};

INSERT INTO serendipity_tempauthors 
(realname,username,password,authorid,mail_comments,mail_trackbacks,email,userlevel,right_publish,hashtype) SELECT 
realname,username,password,authorid,mail_comments,mail_trackbacks,email,userlevel,right_publish,0 FROM serendipity_authors;
DROP TABLE serendipity_authors;

create table serendipity_authors (
  realname varchar(255) NOT NULL default '',
  username varchar(32) default null,
  password varchar(64) default null,
  authorid {AUTOINCREMENT} {PRIMARY},
  mail_comments int(1) default '1',
  mail_trackbacks int(1) default '1',
  email varchar(128) not null default '',
  userlevel int(4) {UNSIGNED} not null default '0',
  right_publish int(1) default '1',
  hashtype int(1) default '0'
) {UTF_8};


INSERT INTO serendipity_authors 
(realname,username,password,authorid,mail_comments,mail_trackbacks,email,userlevel,right_publish,hashtype) SELECT 
realname,username,password,authorid,mail_comments,mail_trackbacks,email,userlevel,right_publish,hashtype FROM serendipity_tempauthors;
DROP TABLE serendipity_tempauthors;
However this gives me the following error:
MySQL said:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{AUTOINCREMENT} {PRIMARY},
mail_comments int(1) default '1',
mail_trackbac' at line 5
Any idea what I am doing wrong and what the best method is in resolving this.

Thanks,
Kevin

Re: Login Problems

Posted: Tue Feb 23, 2010 3:19 pm
by garvinhicking
Hi!

When you are using MySQL you don't need to perform these steps only required for SQLite!

When you use phpMyAdmin to check the "authors" table, does it have a "hashtype" column or doesn't it? Then we can proceed from there, I can give you directions.

Regards,
Garvin

Re: Login Problems

Posted: Tue Feb 23, 2010 3:38 pm
by System0
Hi Garvin,

Thanks for the prompt reply.

No I can't see the hashtype column anywhere.

Here's a screenshot of the author table.

Image removed due to security reasons by kleinerChemiker.

:)

Re: Login Problems

Posted: Tue Feb 23, 2010 10:12 pm
by kleinerChemiker
It's nice that you hide your email but it would have been much better if you hide your password (and user). Thats why I removed your picture.

Re: Login Problems

Posted: Tue Feb 23, 2010 10:50 pm
by System0
kleinerChemiker wrote:It's nice that you hide your email but it would have been much better if you hide your password (and user). Thats why I removed your picture.
Thanks. I didn't think it would be a concern as the blog I am referring to is not listed on any other website I own (It's a blog for family and friends).

Image

Re: Login Problems

Posted: Wed Feb 24, 2010 8:44 am
by kleinerChemiker
Many people use similar or the same passwords for different sites. As long as your blog is online, some "funny" kids could think they are c3wl when they damage your blog. But of course, when somebody wants to hack your blog, with that easy password it won't take them long ;)

Re: Login Problems

Posted: Wed Feb 24, 2010 12:29 pm
by garvinhicking
Hi!

Okay, as you are missing the "hashtype" column, this means that when you upgraded your serendipity, you might have missed to execute the update. From which version did you update from?

You can restore the 'hashtype' column by executing this SQL:

Code: Select all

ALTER TABLE serendipity_authors ADD COLUMN hashtype int(1);
ALTER TABLE serendipity_authors CHANGE password password VARCHAR(64) NOT NULL;
HTH,
Garvin

Re: Login Problems

Posted: Wed Feb 24, 2010 2:29 pm
by System0
thanks Garvin.

All good now :)

Kevin