Topic on Project:Support desk

How to roll back the configuration?

13
AndyPKU (talkcontribs)

Maybe I made some mistakes. After I try to install the extension of Scribunto, I made some configuration. And later on, my site becomes white now. I don't know how to go back. Is there any good idea?

AhmadF.Cheema (talkcontribs)

Depends on what the "configuration" is?

If you installed an extension, by including its files in the "extensions" directory and its code line in LocalSettings.php, then to "roll back" you just have to remove the new lines of code from LocalSettings.php.

For blank pages, see Manual:Errors and symptoms#You see a Blank Page.

AndyPKU (talkcontribs)

I did as it said, add the lines into the locasettings.php

error_reporting( E_ALL ); ini_set( 'display_errors', 1 );

and I got the information:

Fatal error: Uncaught Error: Call to a member function getCode() on null in /var/www/html/includes/user/User.php:1594 Stack trace: #0 /var/www/html/includes/user/User.php(5272): User::getDefaultOptions() #1 /var/www/html/includes/user/User.php(2884): User->loadOptions() #2 /var/www/html/includes/context/RequestContext.php(364): User->getOption('language') #3 /var/www/html/includes/Message.php(380): RequestContext->getLanguage() #4 /var/www/html/includes/Message.php(1275): Message->getLanguage() #5 /var/www/html/includes/Message.php(842): Message->fetchMessage() #6 /var/www/html/includes/Message.php(934): Message->toString('text') #7 /var/www/html/includes/exception/MWExceptionRenderer.php(200): Message->text() #8 /var/www/html/includes/exception/MWExceptionRenderer.php(304): MWExceptionRenderer::msg('dberr-again', 'Try waiting a f...') #9 /var/www/html/includes/exception/MWExceptionRenderer.php(51): MWExceptionRenderer::reportOutageHTML(Object(Wikimedia\Rdbms\DBConnectionError)) #10 /var/www/html/includes/exception/MWExce in /var/www/html/includes/user/User.php on line 1594

I still couldn't figure out where is the problem. I have never changed any file in the includes directory...

AhmadF.Cheema (talkcontribs)

Probably a problem with some extension.

Are you using the Scribunto extension version that corresponds to your version of MediaWiki core?

Try disabling the extension by removing its lines of code from LocalSettings.php, and see if it fixes the site.

AndyPKU (talkcontribs)

I just did as follows:

    Download and place the file(s) in a directory called Scribunto in your extensions/ folder.

   Add the following code at the bottom of your LocalSettings.php:

   wfLoadExtension( 'Scribunto' );

   $wgScribuntoDefaultEngine = 'luastandalone';

   Set execute permissions for the Lua binaries bundled with this extension:

chmod a+x /path/to/extensions/Scribunto/engines/LuaStandalone/binaries/yourOS/lua

   Set type to httpd_sys_script_exec_t if SELinux is enforced:

chcon -t httpd_sys_script_exec_t /path/to/extensions/Scribunto/engines/LuaStandalone/binaries/yourOS/lua@AhmadF.Cheema

AndyPKU (talkcontribs)

yes, I delete the lines of code in Localsettings.php, but it didn't work..

AhmadF.Cheema (talkcontribs)

How exactly did you set "execute permissions for the Lua binaries"?

And do you know that SELinux is enforced for your server setup or not?

AndyPKU (talkcontribs)

I just cd into the directory:

/var/www/html/Scribunto/engines/LuaStandaalone/binaries/Linux5_1_5(I forgetted the exact name) and use the command:

chmod a+x lua

I know nothing about SELinux...

AhmadF.Cheema (talkcontribs)

Try disabling all other extensions too, and see if the "Fatal error" persists.

AndyPKU (talkcontribs)

I have disabled all the other extensions. But it still didn't work..

Ciencia Al Poder (talkcontribs)

The error is still the same? It complains about User->getOption('language'). Does it happen only when logging-in? (try opening the page using private browsing without logging in)

AndyPKU (talkcontribs)

thanks for everybody. After I rebooted the system, the problem is resolved. Although I don't know why, anyway I could see the page now....

星耀晨曦 (talkcontribs)

I suggest you use git to manage the configuration file.