News:

Wondering if this will always be free?  See why free is better.

Main Menu

database

Started by Rogerd, November 24, 2019, 02:58:34 PM

Previous topic - Next topic

Rogerd

Hi...I'm getting this error "Your forum's files are currently at version SMF 2.0.15, while your database is at version 2.0.11" this happened after i moved to a
new server but on the same host, I was wondering if I could restore a database backup from my old server and restore it to the new server via c-panel i'm using smf 2.0.15, thank's in advance.

vbgamer45

That is not a real error just a misleading SMF error message in most cases.. When are you getting that error?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Rogerd

I thought the database error was causing these errors below which I have also, can't remember when the database error popped up now as i've been through so many files.

This error comes up when I test the register button, from the error log.

https://rogers-relics-uk.com/index.php?action=register2Apply Filter: Only show the errors with the same messageDatabase Error: Field 'breeze_profile_views' doesn't have a default valueApply Filter: Only show the errors from this fileFile: /home/rogersrelics/public_html/Sources/Subs-Members.php
Line: 809
this is the code around line 809:
   // Register them into the database.
   $smcFunc['db_insert']('',
      '{db_prefix}members',
      $column_names,
      $values,
      array('id_member')
line 809    );
   $memberID = $smcFunc['db_insert_id']('{db_prefix}members', 'id_member');

this  comes up when i test the register button:   Database Error
Please try again. If you come back to this error screen, report the error to an administrator.


These errors come up in the error log when clicking "Show unread posts since last visit."

https://rogers-relics-uk.com/index.php?action=unreadApply Filter: Only show the errors with the same messageUnable to load the 'main' template.

https://rogers-relics-uk.com/index.php?action=unreadApply Filter: Only show the errors with the
same message2: call_user_func() expects parameter 1 to be a valid callback, function 'UnreadTopics' not found or invalid function nameApply Filter: Only show the errors from this fileFile:
/home/rogersrelics/public_html/index.php
line 170

this is the code around line 170
// What function shall we execute? (done like this for memory's sake.)
line 170        call_user_func(smf_main());

Everything was fine before changing servers.

The other thing I noticed is in a detailed version check, it tells me my version of sources is 2.0.7  current version   2.0.15

Sir Osis of Liver

First error is coming from Breeze mod.  You should be able to fix it by assigning "null" value to breeze_profile_views.  Probably caused by different mysql version on new server.

Registration and unread posts errors - anything in forum or server error logs? 

If you can get to support and credits in admin let's see version info.

Did you run repair_settings after changing servers?  Is mod_security disabled?

File versions are updated only if patch makes changes.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Rogerd

Thank's gentlemen I think I should post this in the paid section tomorrow as it's way over my head.

The errors in the forum logs are above.
The breeze mod was uninstalled a while ago.

Version Information:
Forum version: SMF 2.0.15 (more detailed)
Current SMF version: SMF 2.0.15
GD version: bundled (2.1.0 compatible)
Database Server: MariaDB
MySQL version: 10.3.20-MariaDB
PHP: 5.6.40
Server version: Apache

No i didn't run repair_settings after server change, mod security is off.

Sir Osis of Liver

If you can pm cpanel access (url/user/pw) I'll have a look.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Rogerd

Quote from: Sir Osis of Liver on November 24, 2019, 05:01:57 PM
If you can pm cpanel access (url/user/pw) I'll have a look.


Thank you I'll send you details tommorrow if that's ok.

Sir Osis of Liver

Should get to it tomorrow night.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Wow, what a mess. :P  Unread topics doesn't work because Recent.php has been replaced by Register.phpRecent.php was edited by a mod, if I replace it with a clean file, something will break.  You have 67 mods installed, some of which I don't recognize.  breeze_profile_views is from Suki's Breeze mod, which isn't currently installed.  Don't see it in /Packages, but /backups shows it installed twice in Aug 2019 and once in Nov 2019.  Must be some remnant code left from the mod. 

I know you won't like this, but best thing to do is a clean install.  I've replaced Recent.php with a clean file, and set default value of breeze_profile_views to "null".  You can try running it that way, there are surprisingly few errors in your log, but I don't recommend it.

I've set up an admin account for Krash (that's me) and an FTP account for [email protected].  Leave them until we're done.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Rogerd

#9
Quote from: Sir Osis of Liver on November 25, 2019, 10:13:31 PM
Wow, what a mess. :P  Unread topics doesn't work because Recent.php has been replaced by Register.phpRecent.php was edited by a mod, if I replace it with a clean file, something will break.  You have 67 mods installed, some of which I don't recognize.  breeze_profile_views is from Suki's Breeze mod, which isn't currently installed.  Don't see it in /Packages, but /backups shows it installed twice in Aug 2019 and once in Nov 2019.  Must be some remnant code left from the mod. 

I know you won't like this, but best thing to do is a clean install.  I've replaced Recent.php with a clean file, and set default value of breeze_profile_views to "null".  You can try running it that way, there are surprisingly few errors in your log, but I don't recommend it.

I've set up an admin account for Krash (that's me) and an FTP account for [email protected].  Leave them until we're done.



Hi...I don't really want to do a clean install if I can help it, as I understand I would lose all my mods and also there has been a lot of customised code added over the years, could recent.php be replaced with the one from the backup I'd taken just before the server move?
Only a couple of errors are showing at the moment, one was flagged up when I deleted a dummy member I registered to the site to test the registration function (which worked fine), the error was:


https://rogers-relics-uk.com/index.php?action=profile;area=deleteaccount;saveApply Filter: Only show the errors with the same message2: mysqli_fetch_assoc(): Couldn't fetch mysqli_resultApply Filter: Only show the errors from this fileFile: /home/rogersrelics/public_html/Sources/Subs-Members.php
Line: 385

The other was:
https://rogers-relics-uk.com/index.php?action=unreadApply Filter: Only show the errors with the same message8: Undefined index: protected Apply Filter: Only show the errors from this fileFile: /home/rogersrelics/public_html/Themes/default/Recent.template.php
Line: 175

I'm not sure now about the last error as it seems to have stopped after I changed the recent.php to 777, as I don't know what I'm doing LOL I may have accidentally cured it, famous last words.

Rogerd

Disregard the last sentence of the last post the error doesn't come up when I click "Show unread posts since last visit"  as admin, but does when a member clicks it, strange.

Rogerd

I'm not bothered about the delete member error as I rarely delete members, if we could get rid of the home/rogersrelics/public_html/Themes/default/Recent.template.php error I would be happy with that, or I could turn off error logging, at least the three things that weren't working are now all working fine even with the errors

Arantor

So you have at least one mod that wasn't correctly updated for 2.0.15 / PHP 7.

The suggestion to use a fresh set of files wasn't a bad one, for the record, something is really wrong with your side, despite the apparent "everything seems to work".

Sir Osis of Liver

You can upload the Recent.php backup if it actually is Recent.php.  If you look in Recent.php.sav (the file you were running), you'll see it's actually Register.php.  Turning off error logging won't fix anything.  Some servers block 777 permissions for security reasons, but most of your dirs/files are 777 so that isn't the case here.  Don't think it should cause any problems, but recommended dir/file permissions are 755/644.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Rogerd

I tried to replace the recent.php with the one from a backup before server move, it wouldn't let me replace it, didn't take note of the error I got, seems a backup from the old server cannot be used on the new one.
Checking detailed version check the sources file is showing 1.0.7 in red.

Anyway I've sent you a pm.

Sir Osis of Liver

#15
Attach the Recent.php backup here.  You are running 2.0.7 version of Register.php, it should be 2.0.14, there were updates made.  Your original file Register.php~ (package backup) is 2.0.14.  At some point someone messed around with Register.php and Recent.php and screwed up both files.  It's possible other files are also affected.  Barring a clean install, I can chase errors (there weren't many), but you've cleared error log.  Leave it go for a while.


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Rogerd

I've no idea how this mess happened, the only clue was when I asked for my vps server to be downgraded, after a while they said they couldn't downgrade on my server as there would be data loss, so they would move to a new server, I wonder if there was some data loss before they realised what was happening.
anyway every time a member clicks "Show unread posts since last visit." they are not shown an error, but the error shows in the log.                                                       https://rogers-relics-uk.com/index.php?action=unreadApply Filter: Only show the errors with the same message8: Undefined index: protectedApply Filter: Only show the errors from this fileFile: /home/rogersrelics/public_html/Themes/default/Recent.template.php
Line: 175
Looks like the error comes from Recent.template.php rather than recent.php which I take it is a different file I'll attach both these files for you.

Sir Osis of Liver

Saw that error earlier, it's not causing any problems, unread posts/new replies work fine.  Will see if I can fix it.  Somebody did some ill-advised tinkering with your forum files.  Who is your host?  What have you been doing for backups?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Ok, here's what we've got.  The Recent.php backup has a couple of edits from the View Only Boards mod, otherwise it's core.  I've uploaded it to /Sources, it should be good.  Recent.template.php has quite a few mod edits, most or all are from same mod. and the undefined index "protected" error is from this mod.  Uploading the backup template to /Themes/default seems to have fixed it.  I've cleared error log, will keep an eye on it for next day or so.  I'd be surprised if there aren't more damaged files, but if everything works and there are no more code errors, you can probably get away with leaving it as is.  Other option is, if you have a complete file backup, you can upload the whole thing, but I'd be leery of doing that not knowing how the files I've seen were butchered.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Rogerd

Quote from: Sir Osis of Liver on November 27, 2019, 09:24:57 PM
Saw that error earlier, it's not causing any problems, unread posts/new replies work fine.  Will see if I can fix it.  Somebody did some ill-advised tinkering with your forum files.  Who is your host?  What have you been doing for backups?

My hosts are webhosting uk, I've got to say they have been brilliant over the years, as a silver surfer and novice at servers/php etc I do use support at webhosting quite a lot, and they have always sorted things out in double quick time.
I use c-panel for my backups, also set an auto backup once a month, which starts 1st Dec on the new server.
No more errors so far this morning.
Thank's for everything so far.

Advertisement: