Topic on Project:Support desk

136.158.7.154 (talkcontribs)

Hi.

I have a 404 error when I go to my wiki.

Luckily I got a error log, which says $wgPasswordSender and $wgEnableEmail are undefined and unexpected in that order.

For the first one $wgResourceBasePathki is undefined. I cant find any reference to it in MediaWiki.

The second one says that the variable is unexpected.

There is a third one where the string “apache” is unexpected, and it expected a closing [.

All lines go to the variables, $wgPasswordSender to itself, $wgEnableEmail to $wgEmailAuthentication, and the Apache to $wgDBserver.

Malyacko (talkcontribs)

This lacks version info and lacks logical steps. We don't know how you got to "For the first one $wgResourceBasePathki is undefined." Or what those have to do with each other. Or what you mean by "all lines go to the variables". Please avoid paraphrasing. Thanks.

136.158.7.154 (talkcontribs)

Sorry for under-detailing, I was in a rush.

$wgResourceBasePathki was undefined, and the error was in $wgPasswordSender

The Apache error is in $wgDBserver

And $wgEnableEmail (the unexpected one) to the $wgEnableEmail

Thanks.

Malyacko (talkcontribs)

If you don't share error messages, then only you know what the error is and everybody else has to guess.

Also, nobody knows what "$wgResourceBasePathki" is. Manual:$wgResourceBasePath exists though.

2404:3C00:2540:8DD0:0:0:0:2 (talkcontribs)

Hi same user as before.

Errors:

  • Undefined variable: wgResourceBasePathki in /var/lib/mediawiki/LocalSettings.php on line 39
  • syntax error, unexpected '$wgEnableEmail' (T_VARIABLE)
  • syntax error, unexpected 'apache' (T_STRING), expecting ']'

The code for the errors:

  • $wgPasswordSender = "apache@🌻.invalid";
  • $wgEmailAuthentication = true;
  • $wgDBtype = "mysql";

The order of the code is the same with the errors, Pathki to Password Sender, Enable Email to Authentication, Apache to wgDBType.

Also, here is the code for the rewrite:

RewriteEngine On

RewriteRule ^/?wiki(/.*)?$ /var/www/html/mediawiki/index.php [L]

RewriteRule ^/*$ /var/www/html/mediawiki/index.php [L]

LogLevel alert rewrite:trace6

Malyacko (talkcontribs)

You get an "Undefined variable" because "wgResourceBasePathki" does not exist. See my previous comment. Adding random strings to a config file usually leads to problems, so you may want to remove or fix such strings.

136.158.7.154 (talkcontribs)

But the string was there and it worked fine.

136.158.7.154 (talkcontribs)

Sorry.

I’ll show it tomorrow though.

Thhanks a lot for the help.

136.158.7.154 (talkcontribs)

I cant show the code, because this is my mobile account.

Reply to "PHP Errors"