Topic on Project:Support desk/Flow

Upgrade from 1.27 to 1.35.9 causing "This site can't be reached"

12
Frohro (talkcontribs)

I successfully did the database update using the update php script. I had to change permissions on everything, but I am getting "This site can't be reached" on Chrome, and a slightly different message on firefox. I know the site can be reached, because if I put phpinfo(); in various places in my LocalSettings.php, it displays the phpinfo instead of giving me the bogus message. My LocalSettings has been being modified for many years, and so I tried making a new one, but that didn't seem to solve things either (though I quite likely might have made a mistake with that). The error remains the same. There are no errors or warnings I can find in /var/log/apache2/error.log. I get nothing with

error_reporting(E_ALL);

ini_set("display_errors", 1);

at the top of my LocalSettings.php

Does anyone have any idea what might be my issue, or even how to debug this?

Thanks,

Rob

2001:8F8:1E6D:79DB:D57F:89B9:DD9B:EFAE (talkcontribs)

Try placing this code at the end of LocalSettings.php

error_reporting( -1 );

ini_set( 'display_errors', 1 );

if that not works, try to reinstall the mediawiki, by accessing the mw-config directory, example:

wiki-site.com/mw-config

You need the $wgUpgradeKey value located within the LocalSettings.php.

One more option is to do a clean installation of mediawiki, using the same old database.

2001:8F8:1E6D:79DB:D57F:89B9:DD9B:EFAE (talkcontribs)

You also need to update all active extensions to the matching version of mediawiki.

Frohro (talkcontribs)

Can I just disable the extensions in LocalSettings.php? I was using the Math, Import Users, and EmbedVideo. I tried commenting out anything having to do with extensions or anything else that might be doing extra things. I'm trying the "divide and conquer" approach. Before I started on this approach a phpinfo(); early on in LocalSettings.php would print out, but later in the file it would not. Commenting out offending lines, it now prints if a phpinfo(); is put on the last line. However, removing it gives the dreaded "can't be reached". Here is a copy of my commented LocalSettings.php, with the sensitive data removed.

<?php

# This is for debugging!

error_reporting(E_ALL);

ini_set("display_errors", 1);

# This file was automatically generated by the MediaWiki installer.

# If you make manual changes, please keep track in case you need to

# recreate them later.

#

# See includes/DefaultSettings.php for all configurable settings

# and their default values, but don't forget to make changes in _this_

# file, not there.

wfLoadSkin( 'Vector' );

# If you customize your file layout, set $IP to the directory that contains

# the other MediaWiki files. It will be used as a base to locate files.

# We define this to allow the configuration file to be explicitly

# located in /etc/mediawiki1.9.

# Change this if you are setting up multisite wikis on your server.

#define(MW_INSTALL_PATH,'/var/www/class-wiki');

if( defined( 'MW_INSTALL_PATH' ) ) {

$IP = MW_INSTALL_PATH;

} else {

$IP = dirname( __FILE__ );

}

#Commented by Rob 12/27/2022

#$ExtensionsDirectory = "/etc/mediawiki-extensions/extensions-available";

#$path = array( $IP, "$IP/includes", "$IP/languages" );

#set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );

# needed upon upgrade to 1.35

$wgServer = "http://www.fweb.wallawalla.edu";

# If PHP's memory limit is very low, some operations may fail.

#ini_set( 'memory_limit', '256M' );

#if ( $wgCommandLineMode ) {

# if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {

# die( "This script must be run from the command line\n" );

# }

#} elseif ( empty( $wgNoOutputBuffer ) ) {

## Compress output if the browser supports it

# if( !ini_get( 'zlib.output_compression' ) ) @ob_start( 'ob_gzhandler' );

#}

$wgSitename         = "Class Wiki";

# Disable cache for testing.

#$wgEnableParserCache = false;

#$wgCachePages = false;

## The URL base path to the directory containing the wiki;

## defaults for all runtime URL paths are based off of this.

$wgScriptPath       = "/class-wiki";

## For more information on customizing the URLs please see:

## http://www.mediawiki.org/wiki/Manual:Short_URL

$wgEnableEmail      = false;

$wgEnableUserEmail  = false;

#$wgEmergencyContact = "rob.frohne@wallawalla.edu";

#$wgPasswordSender = "rob.frohne@wallawalla.edu";

## For a detailed description of the following switches see

## http://meta.wikimedia.org/Enotif and http://meta.wikimedia.org/Eauthent

## There are many more options for fine tuning available see

## /includes/DefaultSettings.php

## UPO means: this is also a user preference option

#$wgEnotifUserTalk = true; # UPO

#$wgEnotifWatchlist = true; # UPO

#$wgEmailAuthentication = true;

$wgDBtype           = "mysql";

$wgDBserver         = "127.0.0.1";

$wgDBname           = "changed for sharing";

$wgDBuser           = "changed for sharing";

$wgDBpassword       = "changed for sharing";

$wgDBport           = "5432";

$wgDBprefix         = "";

# Schemas for Postgres

#$wgDBmwschema       = "mediawiki";

#$wgDBts2schema      = "public";

# Experimental charset support for MySQL 4.1/5.0.

#$wgDBmysql5 = true;

## Shared memory settings

$wgUseDatabaseMessages = false;

$wgUseFileCache = false;

$wgMainCacheType = CACHE_NONE;

#$wgShowIPinHeader = false;

$wgMemCachedServers = array ( 0 => 'localhost:11211',);

## To enable image uploads, make sure the 'images' directory

## is writable, then set this to true:

$wgEnableUploads       = true;

$wgUseImageResize      = true;

$wgUseImageMagick = true;

$wgImageMagickConvertCommand = "/usr/bin/convert";

## If you want to use image uploads under safe mode,

## create the directories images/archive, images/thumb and

## images/temp, and make them all writable. Then uncomment

## this, if it's not already uncommented:

# $wgHashedUploadDirectory = false;

## If you have the appropriate support software installed

## you can enable inline LaTeX equations:

#$wgUseTeX           = true;

#$wgTexvc = "/var/www/class-wiki/extensions/Math/math/texvc";

#$wgMathTexvcCheckExecutable = "/var/www/class-wiki/extensions/Math/texvccheck";

$wgLocalInterwiki   = $wgSitename;

$wgLanguageCode = "en";

$wgProxyKey = "changed for sharing";

# When you make changes to this configuration file, this will make

# sure that cached pages are cleared.

$configdate = gmdate( 'YmdHis', @filemtime( __FILE__ ) );

$wgCacheEpoch = max( $wgCacheEpoch, $configdate );

## Default skin: you can change the default skin. Use the internal symbolic

## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':

$wgDefaultSkin = 'Vector';

## For attaching licensing metadata to pages, and displaying an

## appropriate copyright notice / icon. GNU Free Documentation

## License and Creative Commons licenses are supported so far.

$wgFavicon = "$wgScriptPath/favicon.ico";

$wgEnableCreativeCommonsRdf = true;

$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright

$wgRightsUrl = "http://www.gnu.org/copyleft/fdl.html";

$wgRightsText = "GNU Free Documentation License 1.2";

$wgRightsIcon = "${wgScriptPath}/skins/common/images/gnu-fdl.png";

# $wgRightsCode = "gfdl"; # Not yet used

$wgDiff3 = "/usr/bin/diff3";

$wgExternalDiffEngine = 'wikidiff2';

# debian specific include:

if (is_file("/etc/mediawiki-extensions/extensions.php")) {

        include( "/etc/mediawiki-extensions/extensions.php" );

}

#$wgUploadPath       = "$wgScriptPath/upload";

$wgUploadPath = false;

$wgUploadDirectory  = "$IP/upload";

#require_once "$IP/extensions/Math/Math.php";

#$wgDefaultUserOptions['math'] = 'mathml';

#$wgMathFullRestbaseURL= 'https://api.formulasearchengine.com/';

#$wgUseMathJax = true; // enabeling MathJax as rendering option

#$wgDefaultUserOptions['math'] = 'MW_MATH_MATHJAX'; // setting MathJax as default rendering option (optional)

/**

* The default parser for MathJax is 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML'

* If you don't want to or can't use the default and your run your own locally

* replace the below url with something like:

* $wgMathJaxUrl = '/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML';

*/

#$wgMathJaxUrl = 'https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML';

#MathJax_Parser::$MathJaxJS= 'https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML';

#$wgUseTeX                       = true;

#$wgMathPath         = "{$wgUploadPath}/math";

#$wgMathDirectory    = "{$wgUploadDirectory}/math";

$wgTmpDirectory     = "{$wgUploadDirectory}/tmp";

$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'ogg', 'zip', 'application/zip');

$wgUseImageResize               = true;

#$wgEmailConfirmToEdit           = true;

$wgEmailConfirmToEdit           = false;

# Prevent new user registrations except by sysops

$wgGroupPermissions['*']['createaccount'] = false;

$wgGroupPermissions['*']['edit'] = false;

#$wgLogo = "http://www.wallawalla.edu/WWU/logo/logo3.gif";

$wgLogo = "WWU.jpg";

#$wgUseAjax = true;

$wgDebugLogFile = "tmp/wiki.log";

#require_once("{$ExtensionsDirectory}/Footnote.php" );

#require_once("{$ExtensionsDirectory}/SyntaxHighlight_GeSHi.php");

#require_once("{$ExtensionsDirectory}/CategoryTree.php");

#require_once("{$ExtensionsDirectory}/inputbox.php");

#require_once("{$ExtensionsDirectory}/Cite.php");

#require_once("{$ExtensionsDirectory}/ParserFunctions.php");

#require_once("{$ExtensionsDirectory}/NewestPages.php");

#require_once("{$ExtensionsDirectory}/Renameuser.php");

##require_once("{$ExtensionsDirectory}/poem.php");

#require_once("{$ExtensionsDirectory}/PageCSS.php");

$wgAllowUserJs = true;

$wgUseSiteCss = false;

# For cookie problem.

#session_save_path("tmp");

#require_once ( dirname( __FILE__ ) . "/extensions/EmbedVideo/EmbedVideo.php" );

$wgDebugComments = true;

$wgShowSQLErrors = true;

$wgDebugDumpSql  = true;

$wgCookieSecure = false;

$wgShowExceptionDetails = true;

#$wgSessionCacheType = CACHE_DB;

#wfLoadExtension( 'EmbedVideo' );

/**

* The debug log file must never be publicly accessible because it

* contains private data. But ensure that the directory is writeable by the

* PHP script running within your Web server.

* The filename is with the database name of the wiki.

*/

error_reporting( -1 );

ini_set( 'display_errors', 1 );

#wfLoadExtension( 'ImportUsers' );

?>

Frohro (talkcontribs)

I am also not understanding what you mean by "

try to reinstall the mediawiki, by accessing the mw-config directory, example:

wiki-site.com/mw-config

You need the $wgUpgradeKey value located within the LocalSettings.php." Could you provide a link to instructions or something with more details?

Thanks,

Rob

Frohro (talkcontribs)

I just noticed the following warnings at the bottom of the phpinfo page when I have it at the end of LocalSettings.php.

Warning: session_name(): Session name cannot be changed after headers have already been sent in /var/www/class-wiki/includes/Setup.php on line 712

Warning: session_id(): Session ID cannot be changed after headers have already been sent in /var/www/class-wiki/includes/session/SessionBackend.php on line 796

Warning: session_id(): Session ID cannot be changed after headers have already been sent in /var/www/class-wiki/includes/Setup.php on line 756

Warning: session_start(): Session cannot be started after headers have already been sent in /var/www/class-wiki/includes/Setup.php on line 757

Deprecated: strtr(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/class-wiki/includes/Title.php on line 424

Warning: Cannot modify header information - headers already sent by (output started at /var/www/class-wiki/LocalSettings.php:225) in /var/www/class-wiki/includes/libs/HttpStatus.php on line 112

Warning: Cannot modify header information - headers already sent by (output started at /var/www/class-wiki/LocalSettings.php:225) in /var/www/class-wiki/includes/WebResponse.php on line 74

Warning: Cannot modify header information - headers already sent by (output started at /var/www/class-wiki/LocalSettings.php:225) in /var/www/class-wiki/includes/WebResponse.php on line 74

Warning: Cannot modify header information - headers already sent by (output started at /var/www/class-wiki/LocalSettings.php:225) in /var/www/class-wiki/includes/WebResponse.php on line 74

Warning: Cannot modify header information - headers already sent by (output started at /var/www/class-wiki/LocalSettings.php:225) in /var/www/class-wiki/includes/WebResponse.php on line 74

Warning: Cannot modify header information - headers already sent by (output started at /var/www/class-wiki/LocalSettings.php:225) in /var/www/class-wiki/includes/WebResponse.php on line 74

Warning: Cannot modify header information - headers already sent by (output started at /var/www/class-wiki/LocalSettings.php:225) in /var/www/class-wiki/includes/WebResponse.php on line 74

Frohro (talkcontribs)

These warnings also appear in /var/log/apache2/error.log, but don't appear on the screen or in the log if I take the phpinfo(); out of the last line in LocalSettings.php.

2001:8F8:1E6D:79DB:6820:39CA:E76:DC25 (talkcontribs)

Try to reinstall you wiki again, by visiting this URL, yourwiki.com/mw-config.

mw-config is the web-based mediawiki config/installation.

once visited, you will be prompted to either install (read the note) or reinstall the wiki which includes some initial configuration like wiki name, database configuration, and some other basic wiki configuration like enabling extensions, skins, etc..

Note: to reinstall, you have to rename the file LocalSetting.php, to some other name like LocalSettings.back. then you will get another fresh copy of the LocalSettings.php after finishing the installation, use it as a new LocalSettings.php.

Frohro (talkcontribs)

I can't get that far. I get "This site cannot be reached."

Frohro (talkcontribs)

If I put phpinfo() in as the last line of LocalSettings.php, I get the phpinfo with the above warnings, but without it, all I get is "This site cannot be reached."

Frohro (talkcontribs)

Okay, so I went to the latest (1.39.1) and used the mw-config on that. If I used my LocalSettings.php, I get the same errors. If I use a bare bones LocalSetting.php, it loads the page, but extensions I use are not working. The minute I put any $wfLoadExtension( "Math" ), or any other extension I need, I get "The page isn't working" message. As far as I can tell the permissions are the same.

Frohro (talkcontribs)

Huzzah! I got the extensions to work. I had some typos.

Reply to "Upgrade from 1.27 to 1.35.9 causing "This site can't be reached""