Welcome to Geeklog, Anonymous Friday, April 19 2024 @ 04:09 am EDT

Geeklog Forums

Migrate to new Server and 1.5 Geeklog version


Status: offline

congleal

Forum User
Full Member
Registered: 11/08/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
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/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:
Text Formatted Code
passwd varchar(32) NOT NULL default '',

See if you can fix that in phpMyAdmin.

bye, Dirk
 Quote

Status: offline

congleal

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

Status: offline

Dirk

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

Status: offline

congleal

Forum User
Full Member
Registered: 11/08/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
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/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
 Quote

Status: offline

congleal

Forum User
Full Member
Registered: 11/08/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?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/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
 Quote

Status: offline

congleal

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

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/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
 Quote

All times are EDT. The time is now 04:09 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