Page 1 of 2

[ERROR] "Undefined index:cfg' on ManiaLive 2.1.6

Posted: 28 Jul 2012, 04:02
by TatharNuar
When I try to start ManiaLive with no plugins, I get the following error:

Code: Select all

Critical startup error!
 -> ErrorException with code 8
    Undefined index: cfg
  - in
      /home/tathar/Servers/tm2/ManiaLive/libraries/ManiaLive/Application/Comman
      dLineInterpreter.php on line 76
  - Stack: #0
      /home/tathar/Servers/tm2/ManiaLive/libraries/ManiaLive/Application/Comman
      dLineInterpreter.php(76):
      ManiaLive\Application\ErrorHandling::createExceptionFromError(8,
      'Undefined index...', '/home/tathar/Se...', 76, Array)
           #1
      /home/tathar/Servers/tm2/ManiaLive/libraries/ManiaLive/Application/Abstra
      ctApplication.php(52):
      ManiaLive\Application\CommandLineInterpreter::postConfigLoad()
           #2
      /home/tathar/Servers/tm2/ManiaLive/libraries/ManiaLib/Utils/Singleton.php
      (25): ManiaLive\Application\AbstractApplication->__construct()
           #3 /home/tathar/Servers/tm2/ManiaLive/bootstrapper.php(69):
      ManiaLib\Utils\Singleton::getInstance()
           #4 {main}

I'm running ManiaLive 2.1.6 on Ubuntu 12 Linux. I'm not sure what my dedicated server version is. With my luck, I'm just missing a package or something that would make everything work fine.

I'm trying to make a testing server so I can learn PHP by making ManiaLive plugins. I know it's not the best way to learn PHP, but the ManiaLive code guidelines already match how I write C# code, so I'd imagine it'd be fine.

Re: [ERROR] "Undefined index:cfg' on ManiaLive 2.1.6

Posted: 28 Jul 2012, 11:35
by TMarc
Did you change anything, or did you forget to configure at all?
There are a lot of tutorials, please check them first ;)

Re: [ERROR] "Undefined index:cfg' on ManiaLive 2.1.6

Posted: 28 Jul 2012, 11:56
by TatharNuar
Care to post one? I haven't seen more than one tutorial so far.

Re: [ERROR] "Undefined index:cfg' on ManiaLive 2.1.6

Posted: 28 Jul 2012, 12:01
by TMarc
Check this part of the forum: http://forum.maniaplanet.com/viewforum.php?f=46

And you are certainly able to enter "manialive tutorial" in google, eh :roll: ;)

http://phpsourcecode.net/manialive-php- ... ed-server/
http://code.google.com/p/mlepp/wiki/InstallGuide

Re: [ERROR] "Undefined index:cfg' on ManiaLive 2.1.6

Posted: 28 Jul 2012, 12:18
by TatharNuar

Code: Select all

find this at the end:

;------------------
[hostname: testHost]
;------------------

add semicolon at the start of the middle line:
;------------------
;[hostname: testHost]
;------------------ 
Well, this seems to have been one problem I was having, but it didn't fix the error. I've been googling the error code before coming here, and I couldn't find anything about it.

I know you're trying to help, but two of those three links weren't tutorials. The third was a Windows-based tutorial, but I was able to figure out the differences just fine.

EDIT: The first link is pretty much all threads about TMNF and Freezone. I couldn't find anything useful for ManiaLive 2.

Re: [ERROR] "Undefined index:cfg' on ManiaLive 2.1.6

Posted: 28 Jul 2012, 12:59
by TatharNuar
I figured it out. Apparently ManiaLive didn't like the --dedicated_cfg parameter I was using. Removing it seems to have fixed the problem.

Re: [ERROR] "Undefined index:cfg' on ManiaLive 2.1.6

Posted: 28 Jul 2012, 13:08
by TatharNuar
Here's a snippet of a chat that might help in tracking this down.

Code: Select all

ƝolȶheȾ: To be honest, looking in the ManiaLive code, it's a typo causing the error.
ƝolȶheȾ: if(isset($options['dedicated_cfg']))
		{
			$filename = \ManiaLive\Config\Config::getInstance()->dedicatedPath
					.DIRECTORY_SEPARATOR.'UserData'
					.DIRECTORY_SEPARATOR.'Config'
					.DIRECTORY_SEPARATOR.$options['cfg'];
ƝolȶheȾ: Last should be $options['dedicated_cfg'] as well, is my guess.
ƝolȶheȾ: Which is why it's an undefined index, 'cfg' doesn't exist.
Tathar: might want to post that in the thread

Re: [ERROR] "Undefined index:cfg' on ManiaLive 2.1.6

Posted: 28 Jul 2012, 22:55
by frymaster
TMarc wrote:Check this part of the forum: http://forum.maniaplanet.com/viewforum.php?f=46

And you are certainly able to enter "manialive tutorial" in google, eh :roll: ;)

http://phpsourcecode.net/manialive-php- ... ed-server/
http://code.google.com/p/mlepp/wiki/InstallGuide
this attitude is appalling.

As someone else struggling to configure this largely undocumented software, telling people to google for random pages on the web is not appropriate.

This is the sum total of the tutorial information that can be reasonably found from this forum (from the sticky, which points you to manialive.com). Blaming people on the project's forum for not googling to find tutorials is totally improper.

edit: also, the first of your links is blogspam, the second is for installing some plugin. In other words, useless.

Re: [ERROR] "Undefined index:cfg' on ManiaLive 2.1.6

Posted: 29 Jul 2012, 01:43
by TatharNuar
I didn't want to say anything at the time, but now that someone else spoke up, I might as well. Not only was the suggestion that I needed to use Google improper, it incorrectly assumed that I hadn't already done so.

As it turns out, there might be a bug associated with the --dedicated_cfg parameter which caused my error. I posted a discussion with the person who found the possible bug.

Re: [ERROR] "Undefined index:cfg' on ManiaLive 2.1.6

Posted: 29 Jul 2012, 20:48
by The_Big_Boo
There was indeed a typo but it has been fixed a few versions ago (last one is 2.1.14 ;) )