Multiple errors in log after upgrading from 1.1.3 to 2.0.2

Started by krystal, July 24, 2012, 11:22:00 AM

Previous topic - Next topic

krystal

Just made a very long overdue upgrade to my forum.
Everything appears to be working well on the surface, but when I check the error log I find page upon page of recurring errors.

The forum is still in maintenance mode since I wanted to fix it before opening it back up again. The errors are all being caused by "guests."

Here is a sample from the log:

http://www.playmofriends.com/forum/index.php?action=dlattach;attach=44418;type=avatar
2: Invalid argument supplied for foreach()
File: /Sources/Subs.php
Line: 3456

http://www.playmofriends.com/forum/index.php?action=dlattach;attach=44418;type=avatar
2: array_reverse() [<a href='function.array-reverse'>function.array-reverse</a>]: The argument should be an array
File: /Sources/Subs.php
Line: 3456

http://www.playmofriends.com/forum/index.php?action=dlattach;attach=44418;type=avatar
8: Undefined index: template_layers
File: /Sources/Subs.php
Line: 3456

http://www.playmofriends.com/forum/index.php?action=dlattach;attach=44418;type=avatar
8: Undefined index: session_id
File: /Themes/default/Login.template.php (maintenance sub template - eval?)
Line: 161

http://www.playmofriends.com/forum/index.php?action=dlattach;attach=44418;type=avatar
8: Undefined index: character_set
File: /Themes/default/Login.template.php (maintenance sub template - eval?)
Line: 161

http://www.playmofriends.com/forum/index.php?action=dlattach;attach=44418;type=avatar
8: Undefined index: template_layers
File: /Sources/Subs.php
Line: 3349

http://www.playmofriends.com/forum/index.php?action=dlattach;attach=44418;type=avatar
8: Undefined index: html_headers
File: /Sources/Subs.php
Line: 3305

http://www.playmofriends.com/forum/index.php?action=dlattach;attach=44418;type=avatar
8: Undefined index: right_to_left
File: /Sources/Subs.php
Line: 4069

http://www.playmofriends.com/forum/index.php?action=dlattach;attach=44418;type=avatar
8: Undefined index: server
File: /Sources/Subs.php
Line: 817

http://www.playmofriends.com/forum/index.php?action=dlattach;topic=7607.0;attach=35768;image
2: Invalid argument supplied for foreach()
File: /Sources/Subs.php
Line: 3456


And a link to the phpinfo page:
http://www.playmofriends.com/phpinfo.php

I am using the default Curve theme and have so far only made one minor change (text size) to the index.css.

I thought the conflicts may have been caused by some mods, but even after uninstalling them and removing the files, I still get the error messages. The only item now left in the package manager is "SMF 1.0.12 / 1.1.4 / 2.0 b1.1 Update."

Really hope someone can help! It has been 5 years since I made any major changes to the forum so I'm very rusty when it comes to all the technical stuff. :-[


Ricky.

Are you sure you have uploaded and overwritten all latest files from SMF 2.0.2 package ?

krystal

I double checked and went through the directories one by one to make sure that the new files were all there and that all the old ones had been overwritten.

The funny thing is that the errors were happening consistently and in large numbers every few minutes, but shortly after I started this topic they suddenly stopped.

All was quiet for nearly an hour and I thought that I was somehow in the clear, but now they have started up again exactly the same as before. :(


Ricky.

I would suggest that make copy of your Settings.php and and remove all files apart of avatars and attachment and make clean upload.

Remember to have backup before doing anything.

CapadY

Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

krystal

Hi!

Thanks for the suggestions.  :)

I have now emptied the cache several times and tried fresh uploads of files in all directories. I am still getting error messages such as these which I assume are caused by bots.

207.46.194.91 Guest 2: Invalid argument supplied for foreach()
?action=dlattach;attach=43644;type=avatar Today at 13:50:37

207.46.194.91 Guest 2: array_reverse() [<a href='function.array-reverse'>function.array-reverse</a>]: The argument should be an array
?action=dlattach;attach=43644;type=avatar Today at 13:50:37

207.46.194.91 Guest 8: Undefined index: template_layers
?action=dlattach;attach=43644;type=avatar Today at 13:50:37

207.46.194.91 Guest 8: Undefined index: session_id
?action=dlattach;attach=43644;type=avatar Today at 13:50:37

207.46.194.91 Guest 8: Undefined index: character_set
?action=dlattach;attach=43644;type=avatar Today at 13:50:37

207.46.194.91 Guest 2: Invalid argument supplied for foreach()
?action=dlattach;attach=43644;type=avatar Today at 13:50:37

207.46.194.91 Guest 8: Undefined index: template_layers
?action=dlattach;attach=43644;type=avatar Today at 13:50:37

207.46.194.91 Guest 8: Undefined index: html_headers
?action=dlattach;attach=43644;type=avatar Today at 13:50:37

207.46.194.91 Guest 8: Undefined index: right_to_left
?action=dlattach;attach=43644;type=avatar Today at 13:50:37

207.46.194.91 Guest 8: Undefined index: can_mod
?action=dlattach;attach=43644;type=avatar Today at 13:50:37

207.46.194.91 Guest 8: Undefined index: server
?action=dlattach;attach=43644;type=avatar Today at 13:50:37

207.46.194.91 Guest 8: Undefined index: forum_name_html_safe
?action=dlattach;attach=43644;type=avatar



Do you think that these might eventually resolve by themselves once the forum is taken out of maintenance mode? Could they still be accessing old versions of pages even though they were removed a couple of days ago?

I think the frequency of error messages is a little less than it was yesterday. Still bugs me to see them there after trying so many different things to eliminate them. :(

Is there any maintenance I can do using phpMyAdmin which might help?

I also need to install an upgraded version of coppermine and bridge it to the forum. Hopefully that will go smoothly. :-\


Shambles

Could be bots. The IP you listed was used by an MSNBOT

MrPhil

The forum has its own cache directory. Don't forget to empty out the data_....php files from there (or use the admin "Empty the file cache"). Also empty out your browser cache.

Maintenance mode should not have any effect on this. The database probably doesn't either, but it wouldn't hurt to go into your cpanel/phpMyAdmin and CHECK for errors and REPAIR any found.

Once those items are addressed, if you're still getting those errors, something went wrong with your installation and it will have to be examined more deeply.

krystal

The forum cache is definitely empty.

I have checked the database for errors but none were found.

Just finished removing all the files and uploaded yet another fresh set from the upgrade package.

The errors are continuing to be logged even though general functionality does not appear to be affected.

MrPhil

Your second error listing said "Guest", but you said you were in maintenance mode. I'm confused. In $maintenance = 1, only the admin should be able to log on. In = 2, no one should be able to log on. In either case, a guest (not logged on) should not be able to use the forum.

Where did that error listing come from? Is it SMF's error log, and if so, have you trimmed out important information such as the location of the error? Your first error listing showed locations -- do those files say version 1.1.something or 2.0.something?

You replaced all your files by what was in the "Large Upgrade" package? If so, there should be no mods installed -- just a vanilla SMF, It's puzzling that you would get undefined index errors, which almost always come from an incompletely installed (or uninstalled) mod. Did you uninstall your mods at any point in the upgrade process? Did you get rid of any files left over from version 1? To go from 1.1.3 to 2.0.2 would be a Large Upgrade, where you overwrite all of the SMF files. You mentioned having the 1.1.4 update mod -- that would only take you up to 1.1.4, it doesn't take you to 2.0.2. After overwriting all files (except avatars and attachments and Settings.php), you would run an upgrade.php script to change the database. Do these steps sound familiar?

krystal

Quote from: MrPhil on July 25, 2012, 05:02:50 PM
Your second error listing said "Guest", but you said you were in maintenance mode. I'm confused. In $maintenance = 1, only the admin should be able to log on. In = 2, no one should be able to log on. In either case, a guest (not logged on) should not be able to use the forum.

I assumed the errors were being made by bots. Has me completely puzzled too as to how they can access any pages.

Quote
Where did that error listing come from? Is it SMF's error log, and if so, have you trimmed out important information such as the location of the error? Your first error listing showed locations -- do those files say version 1.1.something or 2.0.something?

For the second listing, I clicked on the IP link in the error log which brought up the Track IP page. At the bottom was a truncated list of errors being caused only by that IP.  None of the error listings on either page show file versions.

Quote
You replaced all your files by what was in the "Large Upgrade" package? If so, there should be no mods installed -- just a vanilla SMF, It's puzzling that you would get undefined index errors, which almost always come from an incompletely installed (or uninstalled) mod. Did you uninstall your mods at any point in the upgrade process? Did you get rid of any files left over from version 1?

Yes, I downloaded the 2.0.2 large upgrade zip and uploaded everything 2 days ago. A few hours ago I replaced everything that was on my server by following these instructions. When I go to the package manager it is completely empty with no mods. Nothing from the old version is left on the server apart from my attachments folder and settings.php files.

I did uninstall the old mods shortly after I first upgraded, and I remember a message saying it was unable to remove all the files for one of the mods. Since then I have deleted everything and uploaded completely fresh files more than once, to make sure no traces of them remained.

Quote
To go from 1.1.3 to 2.0.2 would be a Large Upgrade, where you overwrite all of the SMF files. You mentioned having the 1.1.4 update mod -- that would only take you up to 1.1.4, it doesn't take you to 2.0.2.

I never ran that mod - had forgotten that I ever downloaded it because it was so long ago. I was still using 1.1.3 until this recent upgrade. I have deleted that update mod now.

Quote
After overwriting all files (except avatars and attachments and Settings.php), you would run an upgrade.php script to change the database. Do these steps sound familiar?

Yes, that is exactly what I did. Had a few problems initially with a missing file causing a critical error, but once I located it and put it in the right place, the upgrade script ran perfectly and it definitely went right through to the end without any further errors flagging up.


Thanks for trying to help me work this out. Really appreciate your time and comments. :)

Ricky.

 The errors you showed suggest that there few old files there.. but I can be wrong. ... as you are sure you have emptied and uploaded everything afresh.  :-\  :-\  :-\

MrPhil

Quote from: krystal on July 25, 2012, 05:46:35 PM
None of the error listings on either page show file versions.
You would have to go into the files themselves, and look near the top for @version. I'm asking, because I'm wondering if somehow you ended up with a mix of 1.1.3 and 2.0.2 files. Are all of your files writable (644 permissions)? If not, that might explain 1.1.3 (or earlier) versions sticking around.

krystal

All the files are writable. :) I have opened every single php file on the server and checked the version information. The majority say 2.0 but there are also some with 2.0.1 or 2.0.2.

I also compared the size of each of my php files against those in the original package, in case something didn't upload completely, and they are all identical. The last modified date stamps are all showing correctly too.

MrPhil

Remember that "writable" to the account owner isn't necessarily writable by PHP, if it's running in your group or even as "other" ID. In the group case, your directories might have to be 775 and files 664 for SMF to write to its own files. In the "other" ("world") case, they might have to temporarily be 777 and 666. You'll find out soon enough when you try to install mods, but I don't think a Large Update is going to try writing to any files from within SMF.

So your PHP files are stock, vanilla SMF, yet you're getting "undefined index" errors? That shouldn't happen. I don't think the database will affect it, but it's definitely been updated, and the smf_settings table entry for smfVersion shows '2.0.2'? Both the SMF cache and your browser cache have been cleared? You are using the default theme? Note that version 1.1 themes will not work with SMF 2.0.

If I think of anything, I'll report back. In the mean time maybe someone else has seen this?

krystal

Thanks for the response. :)

The directories are all 775 and the files are 664.

Before I deleted everything and did a fresh upload of files yesterday I did successfully install a new mod called Dozen Pages. That is all wiped now since the fresh install.

I am definitely using the default theme and this is what I see in my database:

QuoteTable: smf_settings

variable: smfVersion

value: 2.0.2

I have emptied everything except cookies from the browser cache.

There was nothing in the error log for over an hour this morning (was starting to hope that the problem had gone away  ::)) but they have started up again just like before. So frustrating. :(

krystal

Please excuse the double-post. Just wanted to let you know that I have taken the forum out of maintenance mode for a little while so that the members can take a look around and test things out for me.

The errors are still showing up in the log. I don't know if you will be able to detect anything off with the files by browsing the forum's pages, but here it is:

http://www.playmofriends.com/forum/index.php

No mods installed as yet, very minimal changes to the index.css and only a few custom graphics replacing original ones.
I like the Curve theme a lot and didn't want to tinker too much with it. :)

MrPhil

Did you clear out the error log(s) each time you install fresh files, so that you're not looking at older errors? What PHP version are you running? SMF 2.0.2 is being successfully run on 5.3, but it's possible that 5.4 (some hosts are jumping the gun and installing this bleeding-edge version) might have problems. Otherwise, I'm out of ideas for now.

krystal


PHP is version 5.2.17. And yes, I definitely cleared the error log each time. :)

I have good news!  ;D

The last undefined or general "guest" error was logged 7 hours ago at 13.37 GMT.  Forum was taken out of maintenance mode at 15.30. I don't know if there is a connection between these two events or if it's just a big co-incidence. The longest gap between errors previously was about an hour, so I think I can safely say the problem has cleared up (touch wood!). :D

Many thanks again for the support!

Advertisement: