SMF 2.1 Beta 4 reports an error when accessing the Load Balancing page

Started by GigaWatt, July 02, 2018, 10:40:49 AM

Previous topic - Next topic

GigaWatt

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.



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.

"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?"..."

Kindred

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"
Сл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."

d3vcho

I couldn't reproduce the error in my local environment. All options in the Load Balancing page were gray too.
"Greeting Death as an old friend, they departed this life as equals"

Illori

Quote from: d3vcho(void) on July 02, 2018, 11:29:17 AM
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.

d3vcho

Huh, yeah, I got that one instead. It'll be harder for me to reproduce then.
"Greeting Death as an old friend, they departed this life as equals"


GigaWatt

Quote from: Kindred on July 02, 2018, 11:15:45 AM
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?"..."

albertlast

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.

GigaWatt

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?"..."

Advertisement: