Welcome to Geeklog Tuesday, September 17 2019 @ 06:22 am EDT

Geeklog Forums

Migrate to new Server and 1.5 Geeklog version


Status: offline

congleal

Forum User
Full Member
Registered: 08/11/04
Posts: 179
One of the easier migration that I've done, however the only remaining issue I have having is trying to create new users as noted below. I can edit existing users but can create new ones. I tried turning PEAR = True then PEAR = False and restarted server but have same issue.

1364: Field 'passwd' doesn't have a default value. SQL in question: INSERT INTO gl_users (username,email,regdate,cookietimeout)
VALUES ('leec','leec@somedomain.com','2009-01-24 08:03:22','28800'Wink

Thanks

Lee

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: congleal

1364: Field 'passwd' doesn't have a default value.


That doesn't really have anything to do with PEAR ...

The passwd field should have '' (i.e. an empty string) as the default. From the table definition:
PHP Formatted Code
passwd varchar(32) NOT NULL default '',

See if you can fix that in phpMyAdmin.

bye, Dirk

Status: offline

congleal

Forum User
Full Member
Registered: 08/11/04
Posts: 179
Which table is that? Rolling Eyes

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
gl_users

Status: offline

congleal

Forum User
Full Member
Registered: 08/11/04
Posts: 179
Dirk,
Thanks for your patience, I found the table and entry. i compared it to another one of my sites that doesn't have a problem and looks like you're spot on with your solution. However I'm user MySQL Administrator, there are 7 columns: Column Name, Datatype, Not Null, Auto Inc, Flags, Default Value and Comment.
The 6th column Default Value is Null, however on the table editor you can make a manual entry or to the right is a NULL button that you click. Thinking that perhaps if you click an already set NULL value that it might reset it but it didn't work.

Thanks

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
To MySQL, NULL and an empty string are not the same thing. Try entering something into that field, then remove what you typed again (so it's empty) and save your change. That should do the trick.

bye, Dirk

Status: offline

congleal

Forum User
Full Member
Registered: 08/11/04
Posts: 179
It automatically puts the NULL back in when I remove the number. Tried it again, put 0 in then tried to empty the field and it is putting 0 back into the field?

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Actually, since the field is supposed to be "NOT NULL" you also need to change that. And then you should be able to set a default value.

bye, Dirk

Status: offline

congleal

Forum User
Full Member
Registered: 08/11/04
Posts: 179
Sorry, I'm not following can you give me more details? :shock:

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
I meant changing the "NULL / NOT NULL" option to NOT NULL first, then try to enter an empty default value.

bye, Dirk

All times are EDT. The time is now 06:22 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content