Topic on Project:Support desk

Error installing MW 1.27

7
Tycho Lursen (talkcontribs)

Hello,

I'm trying to do a fresh install. I verified the tarball and uploaded it to the server.

When I try to install I get this:

(Also reported here: Topic:T70tn1irrw8ny8ts)

Exception encountered, of type "Wikimedia\Assert\ParameterAssertionException"

[V3uvKsCoKvAAAFjq0lIAAAVl] /p/mw-config/index.php Wikimedia\Assert\ParameterAssertionException from line 63 of /mnt/web006/e3/17/56865117/htdocs/lursenorg/p/vendor/wikimedia/assert/src/Assert.php: Bad value for parameter maxKeys: must be above zero

Backtrace:

#0 /mnt/web006/e3/17/56865117/htdocs/lursenorg/p/includes/libs/objectcache/HashBagOStuff.php(49): Wikimedia\Assert\Assert::parameter(boolean, string, string)

#1 /mnt/web006/e3/17/56865117/htdocs/lursenorg/p/includes/libs/objectcache/CachedBagOStuff.php(46): HashBagOStuff->__construct(array)

#2 /mnt/web006/e3/17/56865117/htdocs/lursenorg/p/includes/session/SessionManager.php(172): CachedBagOStuff->__construct(EmptyBagOStuff)

#3 /mnt/web006/e3/17/56865117/htdocs/lursenorg/p/includes/session/SessionManager.php(85): MediaWiki\Session\SessionManager->__construct()

#4 /mnt/web006/e3/17/56865117/htdocs/lursenorg/p/includes/WebRequest.php(700): MediaWiki\Session\SessionManager::singleton()

#5 /mnt/web006/e3/17/56865117/htdocs/lursenorg/p/includes/session/SessionManager.php(121): WebRequest->getSession()

#6 /mnt/web006/e3/17/56865117/htdocs/lursenorg/p/includes/Setup.php(745): MediaWiki\Session\SessionManager::getGlobalSession()

#7 /mnt/web006/e3/17/56865117/htdocs/lursenorg/p/includes/WebStart.php(137): require_once(string)

#8 /mnt/web006/e3/17/56865117/htdocs/lursenorg/p/mw-config/index.php(36): require(string)

#9 {main}

I tried uploading to the server again, same result.

Any help is highly appreciated.

Tycho Lursen (talkcontribs)

Strange, a fresh install on my home server (Debian Jessie) is without any problems.

But installing on my ISP's server gives me this trouble. A fresh install of 1.26.3 on my ISP's server goes without any problems though.

However, changing the file includes/libs/objectcache/HashBagOStuff.php gets me up and running. Just commenting out line 49 does the trick.

change:

Assert::parameter( $this->maxCacheKeys > 0, 'maxKeys', 'must be above zero' );

to:

/**

*    Assert::parameter( $this->maxCacheKeys > 0, 'maxKeys', 'must be above zero' );

*/

But I don't know if this is safe to do.

Can someone please shed some light on this?

Ciencia Al Poder (talkcontribs)

Maybe you need to purge a cache store like memcached or similar on the ISP's server? Have you defined any caching on your LocalSettings.php?

Tycho Lursen (talkcontribs)

Thanks for your answer.

Without the change to includes/libs/objectcache/HashBagOStuff.php setup simply crashes. Mind you, I'm doing a fresh install, brandnew database, not an upgrade. Moreover, I never used memcached or similar before, so there is no cache to reset/empty.

In LocalSettings.php I've got this:

## Shared memory settings

$wgMainCacheType = CACHE_NONE;

$wgMemCachedServers = [];

But I can't imagine that to be relevant at all. After all, I only get to the point that setup generates the file if I changed includes/libs/objectcache/HashBagOStuff.php.

I don't understand why this assert is even there (unconditional). I get that you need a value of >0, IF you use these caches...

Ciencia Al Poder (talkcontribs)

Ah, I didn't understood it right. Yeah, that does indeed look like a bug. The assert should be there, but the installer shouldn't be using it. Can you please report it as a bug? Link the bug report here if you do. There seem to be some probems with this new session manager that has been introduced in 1.27.

Tycho Lursen (talkcontribs)

There's more to it: If I restore the original includes/libs/objectcache/HashBagOStuff.php after setup has been done successfully, I get:

Exception encountered, of type "Wikimedia\Assert\ParameterAssertionException"

So just like in Topic:T70tn1irrw8ny8ts but without the backtrace I get starting a fresh install.

Tycho Lursen (talkcontribs)

Bug report is here:

Reply to "Error installing MW 1.27"