News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Database error after server upgrade

Started by MadMick, April 06, 2023, 03:34:52 AM

Previous topic - Next topic

MadMick

Hey guys,

Recently upgraded our server to a much more modern one along with all the software, since that new members can't register and I can't register them either, this is the error message I get,

QuoteDatabase Error
Field 'timezone' doesn't have a default value
File: /home/mick/domains/australianhunting.net/public_html/Sources/Subs-Members.php
Line: 775

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.19, while your database is at version 2.0.15. The above error might possibly go away if you execute the latest version of upgrade.php.

I read here earlier that the database hasn't changed since 2.0.10 so I assume there is no need to upgrade it?.

Had a look at line 775 on the current and prior Subs-Members.php files and they are identical and neither mentions Timezone?, any ideas what's going on here?, line 775 just has this,

Quote// Register them into the database.
   $smcFunc['db_insert']('',
      '{db_prefix}members',
      $column_names,
      $values,
      array('id_member')
   );
   $memberID = $smcFunc['db_insert_id']('{db_prefix}members', 'id_member');

Cheers and thanks,

Mick
Regards,

Mick.

AHN Moderators - Can explain it to you, but they can't understand it for you"

Aleksi "Lex" Kilpinen

If everything worked well before the upgrade, you can probably fix this by simply giving the field the default NULL.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

MadMick

Quote from: Aleksi on April 06, 2023, 04:34:02 AMIf everything worked well before the upgrade, you can probably fix this by simply giving the field the default NULL.


Hey Lex,

Many apologies for the very late reply mate, I have been very ill with all sorts of crap 👎🏻.

My problem is still there but getting worse, I cannot change any settings for the forum without getting a database error.

This last error today popped up after I tried changing a couple of board permissions, basically allowing a few extra member groups to access a certain board. Error message below,

Data too long for column 'member_groups' at row 1
File: /home/mick/domains/australianhunting.net/public_html/Sources/Subs-Boards.php
Line: 665

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.19, while your database is at version 2.0.15. The above error might possibly go away if you execute the latest version of upgrade.php.

I'm not quite sure what you meant above either?, to just NULL the field?, which field and where?.

I know I have sorted similar errors many years ago by running the upgrade.php but buggered if I remember where to find that file?.

Any help with this will be very much appreciated 😊

Cheers guys,

Mick
Regards,

Mick.

AHN Moderators - Can explain it to you, but they can't understand it for you"

Kindred

upgrade.php is part of the upgrade archive file (instead of the install archive)

However, since there were no database changes between 2.0.15 and 2.0.19 -- the error message is a red herring.

How many member groups do you have and what are their names?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Aleksi "Lex" Kilpinen

Now, we seem to have multiple different errors here. What I was addressing was specifically the "doesn't have a default value" error. That can be fixed through phpmyadmin or a similar tool, by locating the mentioned field inside the database, and then assigning it a default value. Most commonly, NULL will work and will not cause any issues.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

MadMick

Hey guys,

Thanks for the replies 😊👍🏻.

Member groups we have 60 odd, I will soon remove quite a few as they were created for our sponsors and we only have a couple left these days.

If the names matter I will take a screen shot for you, but I don't think it's related to them as I get my an error no matter what I try to do with the database?. Obviously it's still allowing members to post new threads and replies, but anything done on the admin side pops up a similar error.

No one has been able to join our forum since around the 26-27th March when we first fired up the new server, it also chucks up an error.

As mentioned, I have had all sorts of health issues which is why it's taken this long to get back to this 🫤.

I'm at a loss here now as no matter what I try to change on the forum now I get errors?.

Trying to do it all on a phone just compounds the frustration too as my damn PC died on me 🫤.
Regards,

Mick.

AHN Moderators - Can explain it to you, but they can't understand it for you"

Advertisement: