Advertisement:

Author Topic: SMF 2.1 Beta 4 reports an error when accessing the Load Balancing page  (Read 1814 times)

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,467
  • Gender: Male
    • Macedonian electronics forum
I reported this problem in another thread here, but I'm not really sure it's a bug or a FAD.

I set up a test version of SMF 2.1 Beta 4 on a free server that has cPanel support, just to test it, take a look at the options, etc. Apparently, this server doesn't support load balancing since, when I try to access the page, the Load Balancing settings are all grayed out, and SMF detects and properly reports this, as can be seen from the screen shot below.



But, as soon as I visit the page, an error is reported in the Admin menu.



Code: [Select]
Type of error: Undefined

8: Undefined index: load_average

http://forum.url/index.php?action=admin;area=serversettings;sa=loads;dce8cf7f=81784862d56c069b8dc4fbb6b965df58

forum_root/Sources/ManageServer.php (Line 758)

Is this a FAD or a bug? Is visiting a page in the settings with features that are not supported by the server going to generate an error each time you visit that page?

Oh, and another question. Is there a way to remove the error counter in the Admin menu in the tool bar? By removing the counter, I mean just not appear in the menu bar. I don't mind seeing it in the drop down menu, just not the menu button :S.

« Last Edit: July 02, 2018, 07:00:17 PM by GigaWatt »
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,365
  • Gender: Male
    • Kindred-999 on GitHub
and the answer to the second question is no.

The way to remove the counter is to clear the error log and fix the issue so that the error doesn't reoccur.

Don't forget, when reporting an error from the log, also include the actual lines of code (~10 before ~5 after the marked code-line)

I'm better it's either a missing text variable or a count variable that is not properly checked for "if defined"
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Online d3vcho();

  • Sempiterno
  • Lead Localizer
  • SMF Hero
  • *
  • Posts: 3,031
  • Gender: Male
    • frandominguez03 on GitHub
I couldn't reproduce the error in my local environment. All options in the Load Balancing page were gray too.
"Too weird to live but much too rare to die"

d3vcho(void)

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 50,095
I couldn't reproduce the error in my local environment. All options in the Load Balancing page were gray too.

did you get the same message or was it a different one? on my localhost it says "Load balancing support is not available on Windows." which is different then the error in the OP.

Online d3vcho();

  • Sempiterno
  • Lead Localizer
  • SMF Hero
  • *
  • Posts: 3,031
  • Gender: Male
    • frandominguez03 on GitHub
Huh, yeah, I got that one instead. It'll be harder for me to reproduce then.
"Too weird to live but much too rare to die"

d3vcho(void)

Offline albertlast

  • Development Contributor
  • Jr. Member
  • *
  • Posts: 370

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,467
  • Gender: Male
    • Macedonian electronics forum
Don't forget, when reporting an error from the log, also include the actual lines of code (~10 before ~5 after the marked code-line)

Got it, no problem ;).

So I just download the latest nightly, overwrite the original files (without actually installing anything) and that's it, or do I download the upgrade pack and upgrade my install to get the latest set of files and test if the fix works?
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline albertlast

  • Development Contributor
  • Jr. Member
  • *
  • Posts: 370
Well the first question would be,
if ther already the fix pr included,
when you use my nightly download, which is builded twice per day,

This you could check by calling the newest last_commit* file, in this you find a url which show you the diff between you version and the github version.

You should use the upgrade packed, if you need to call the upgrade process you see when you call your old last_commit* file take the url and look at the diff,
if the upgrade* files are touched or not,
when touched you should try to run the upgrade process when not then not.

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,467
  • Gender: Male
    • Macedonian electronics forum
Just tried the fix. I manually implemented the fix in ManageServer.php (edited the line as proposed by the commit) and the fix seems to work. Tried loading the load balancing page, no errors were generated in the error log and the load balancing page loads correctly ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."