Advertisement:

Author Topic: Too many error logs  (Read 1131 times)

Offline sǝๅqɯɐɥS

  • SMF Hero
  • ******
  • Posts: 4,509
  • Gender: Male
    • i30 Owners Club
Re: Too many error logs
« Reply #20 on: December 06, 2017, 12:52:08 PM »
Quote from: Sir Osis of Liver
Looks like index.php is correct ...

In the supplied index.php file there appears to be part of the installation missing:

Code: [Select]
<operation>
<search position="replace"><![CDATA[if (empty($board) && empty($topic))]]></search>
<add><![CDATA[if (empty($board) && empty($topic) && isset($_REQUEST['blog']))
{
require_once($sourcedir . '/BlogFeatures.php');
return 'BlogMain';
}
elseif (empty($board) && empty($topic))]]></add>
</operation>

Makes me wonder what else is missing/misplaced...

Offline ninik

  • Semi-Newbie
  • *
  • Posts: 72
Re: Too many error logs
« Reply #21 on: December 06, 2017, 01:28:50 PM »
Hi shambles,

so what are you proposing that I should do... follow Osis advice or what? I am confused right now?!

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,077
  • 'Tis the gift to be simple
Re: Too many error logs
« Reply #22 on: December 06, 2017, 09:48:25 PM »
Hmm, I only looked for the code Suki posted, but it does look like more of the mod code is missing.  You might try uninstalling/reinstalling it, but you'll get uninstall errors for index.php.  Does the mod work?

Offline ninik

  • Semi-Newbie
  • *
  • Posts: 72
Re: Too many error logs
« Reply #23 on: December 06, 2017, 11:36:10 PM »
yes the mode works fine and  practically with no issues...

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,077
  • 'Tis the gift to be simple
Re: Too many error logs
« Reply #24 on: December 06, 2017, 11:56:24 PM »
Try the attached index.php.

Offline ninik

  • Semi-Newbie
  • *
  • Posts: 72
Re: Too many error logs
« Reply #25 on: December 08, 2017, 12:55:23 AM »
Hi Sir Osis of Liver,

and I apologize for my delayed reply.

it appears that the error log has stop generating these undefined types of errors (in other terms, it appears as if you did resolve the issue).  :)

If I may ask, what magic did you exactly perform here and did it solve the specific issue or did it stop generating errors all together in the error log?  :)


PS: give me 24 hours to be sure that the problem has been resolved 100% and I will mark the topic as solved.

But I do indeed thank you!!!  :)

Offline Suki

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 15,083
  • Kaizoku Jotei
    • MissAllSunday on GitHub
    • SMF mods
Re: Too many error logs
« Reply #26 on: December 08, 2017, 11:02:20 AM »
The file that contains the function needed wasn't loaded by the time it was called, by including the file the function got called, the var became defined and thus the error messages were gone.
Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,077
  • 'Tis the gift to be simple
Re: Too many error logs
« Reply #27 on: December 08, 2017, 12:07:23 PM »
For reasons unknown, all of the code for that mod was missing in index.php, possibly because you at some point restored a backup from before mod was installed.


Offline ninik

  • Semi-Newbie
  • *
  • Posts: 72
Re: Too many error logs
« Reply #28 on: December 08, 2017, 12:28:16 PM »
Hi Suki and Sir Osis of Liver,

here is how things currently stand.

Previously, the error log created constantly errors for everything. For example, if a member, or even me who is the administrator, posted something or just navigated through the forum, undefined errors would be created constantly - for every action.

The specific sections that create these problems are the once that I did mentioned in my original post.

Now, after the corrections provided by Sir Osis of Liver, undefined errors are created only for guests that try to visit the forum (as a side note: in order to enter the forum someone would have to register first - or already being a member of it). In other terms, it is something like a "closed" forum.


As stated above, errors continue to be created but now, solely for guests... and with the term guests, included are also, spammers who try to enter (hence, activation can only occur by the administrator) or bots who try to find their way into the forum but are blocked automatically.

In terms of numbers (in regards to undefined errors), the error count since my last post was 1024, now the undefined errors are 6086.

So, what would you guys suggest me to do?

PS: Sir Osis of Liver, you said:

Code: [Select]
possibly because you at some point restored a backup from before mod was installed.

Indeed, a few months ago, when I performed an update from the 2.0.13 version to the 2.0.14, the first time something went wrong and I did have to restore things from the backup.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,077
  • 'Tis the gift to be simple
Re: Too many error logs
« Reply #29 on: December 08, 2017, 12:41:24 PM »
If you do a complete backup before making changes, and restore the backup in it's entirety, it brings you back to where you were before any changes were made.  If you try to fix a problem by selectively restoring individual files, you'll break things, and undefined index errors are a typical result.  Package manager can have problems installing/uninstalling mods that aren't exactly right, or you can install a mod with errors and the mod works, but you end up with broken bits of code, and again this can cause undefined index errors.  Best way to fix it is to upload a clean set of files, reinstall the mods, and restore any other customizations you have running. 

Offline ninik

  • Semi-Newbie
  • *
  • Posts: 72
Re: Too many error logs
« Reply #30 on: December 08, 2017, 04:53:30 PM »
Hi Sir Osis of Liver,

I understand your suggestion and most probably this is what I am going to do. Also, I thank you for your insights.

Finally, before I proceed... should I restore the index.php the way it was before your changes or should I leave it as it is.
Thing is that in my mind (without being sure about it, of course), is to revert to the previous index.php and than proceed with uninstalling, and afterwards re-installing, the mod...

Am I thinking about it correctly?

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,077
  • 'Tis the gift to be simple
Re: Too many error logs
« Reply #31 on: December 08, 2017, 09:05:38 PM »
If you upload a clean set of files, index.php is included in the package, so your existing file will be overwritten with a clean one.  Just be sure you have backup copies of Settings.php and Settings_bak.php.


Offline ninik

  • Semi-Newbie
  • *
  • Posts: 72
Re: Too many error logs
« Reply #32 on: December 08, 2017, 11:05:52 PM »
OK Sir Osis of Liver, will do; and thank you  :)

Apart from it I will mark this topic as solved.

Finally, I would like to thank both Sir Osis of Liver and Suki for all the trouble you guys went through so as to assist me and help me with my issue.

Thanks again guys! :)