Jump to content

Manual:よくあるエラーと症状

From mediawiki.org
This page is a translated version of the page Manual:Common errors and symptoms and the translation is 30% complete.


白紙ページが表示される

真っ白なページは、画面に出力されない PHP エラーを示します。 これを強制するには、LocalSettings.php ファイルの <?php の下に、以下の行を追加します:

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

また、PHP.inierror_log の値を設定し、PHP のエラー ログを読むことで、何が起こっているかを把握できます。 場合によっては、PHP エラーも Web サーバーのエラー ログに記録されることがあります。

エラー報告には、以下のようなものがあります:

  • 「警告 [...] システムのタイムゾーン設定に依存することは安全ではありません。date.timezone 設定または date_default_timezone_set() 関数を使用することが*必要*です。」 php.ini 内 で date.timezone = が正しく設定されているか (または設定されているかどうか) を確認してください。
  • 特定のファイルが見つからないと報告される場合があります (例: /includes フォルダー内の media フォルダーが存在しなくなった場合、「ストリームを開けませんでした」という必要なイメージング プロセスのメッセージが表示される場合があります)。 これが当てはまるかどうかを確認するには、MediaWiki の元のインストール パッケージを確認してください (適切なバージョンを参照してください)。 その場合は、単純にパッケージから欠落しているファイルを MediaWiki ディレクトリにコピーしてください。 キャッシュの更新や、その後のウェブサーバーの再起動が必要になる場合があります。
  • MySQL ソケットが見つかりません。 LocalSettings.php に正しい MySQL ソケットに設定されていても、php.ini が設定されていない場合、ウェブサーバーや PHP からエラー出力がない白い画面が表示される場合があります。 修正するには、php.ini ファイル内の mysql.default_socket エントリを更新します。

最近のバージョンでは、新しいウィキに記事を投稿した後、空白のページができたと報告する人が多くいます。 考えられる原因は、既定でインストールされている PHP のメモリ制限 (通常 8MB) です。 PHP や Apache のエラー ログを確認してください。 この設定を変更するには、/etc/php.ini を編集し、「memory_limit」の設定を増やします。 例えば、32MB にする場合は、既存のテキストを memory_limit = 32M に置き換えてください。 この値を変更した後は、必ず Web サーバーを再起動してください。

また、LocalSettings.php ファイルでメモリ制限が設定されている可能性もあります。 memory_limit 設定を含む行を見つけ、必要に応じて増加させてください。 バージョン 1.15.1 を使用している場合、20M では不十分な可能性があります。 例えば「memory_limit = 32M」に変更します。 この変更により、Apache の再起動は必要ありません。

特定の操作を実行している際に、ページがしばらく (例えば30秒程度) 読み込み中のままで、その後空白ページや HTTP 500 エラーが表示される場合、問題はサーバーへの接続タイムアウトです。 この問題はデータベース サーバー、または特定の操作を行う際にメール サーバー (メール設定を構成している場合) に関連している可能性があります。 メール サーバーが原因であれば、MediaWiki が実行されているサーバーからそのメール サーバーに接続できるか確認してください。例えば、Telnet クライアントを使用して、$wgSMTP で設定されたサーバーとポートに接続できるか確認します。

ページの内容が一瞬表示され、その後突然ページ全体が空白になる場合、問題はウィキのスクリプトのいずれかに document.writedocument.writelndocument.open の JavaScript 命令が存在することが原因である可能性が高いです。 それが原因かどうかは、ブラウザーのコンソールを開いて (F12 キーを押して) ページを再読み込みすることで確認できます。 ネットワーク タブで HTTP 200 ステータスが返され、転送データが数キロ バイトである場合、これが問題である可能性が非常に高いです。 これらは Document インターフェイスの旧式のメソッドで、ページの HTML 外で使用されるとページ全体が空白になる原因となります。これらはウィキの JavaScript ページに存在する可能性があります。 HTML 仕様自体が示すように、その使用は強く推奨されません。 ブラウザーで JavaScript を無効にするか、$wgUseSiteJs $wgAllowUserJs false を設定して、壊れたスクリプトを修正するまでそれらのスクリプトを無効にできます。

MediaWikiのエラー

画像のサムネイルが機能しない、または表示されない

この節では、サムネイルが表示されない、または描画されない問題とその解決策を示します。

サムネイルの作成エラー: ファイルが見つかりません:

これは、以下で説明されているように、グローバル変数の値が誤っているために発生する可能性があります:

Decimal-point in srcset locale bug

If image thumbnails simply don't appear, and there's no error visible on those pages, look at the HTML source of the page and search for "srcset". If you find something like <img ... srcset="/images/thumb/File.png/600px-File.png 1,5x, /images/thumb/File.png/800px-File.png 2x">, where it appears 1,5x instead of 1.5x, the problem is caused by T181987, and you should add this to LocalSettings.php:

setlocale(LC_NUMERIC, "C");

SVG

まず、$wgSVGConverter を設定します。 既定では、ImageMagick を使用して変換するように設定されています。

ImageMagick の使用

ImageMagick 6.x.x 以降が必要です。 $wgImageMagickConvertCommand 変数が有効であることを確認してください。 一般的な設定は以下の通りです:

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

動作しない場合は、$wgSVGConverterPath を設定してみてください。

$wgSVGConverterPath = "/usr/bin";
$wgSVGConverterPath = "/usr/local/bin";

共有ホストでは、他のユーザーのニーズに合わせて異なるバージョンの ImageMagick を提供している場合があります。 バージョン 6.x.x を使用してください。

  • ImageMagick のバージョンを確認するには、ホストプロバイダーのヘルプファイルを検索するか、/usr/bin/convert --version または /usr/local/bin/convert --version を使用します。
  • GoDaddy Linux 共有ホストでは、バージョン 5.5.6 の場合は「/usr/bin/convert」、バージョン 6.2.8 の場合は「/usr/local/bin/convert」です。

If generating thumbnails with ImageMagick fails with a web server error log message like "Memory allocation failed" or "/bin/ulimit4.sh: Segmentation fault /usr/bin/convert ...", the $wgMaxShellMemory value may need to be increased.

When the path is missing non-ASCII characters

  • Check if UTF-8 locals are available on your server by running locale -a
  • When it's not available run locale-gen en_US.utf8 or put in the locales with UTF-8 for your country and change the value for $wgShellLocale according to this.

When using IIS/FastCGI on Windows, the guest account that is used also needs execute permission on C:\Windows\System32\cmd.exe otherwise you will receive an "Unable to Fork" error.

Batik の使用

MediaWiki places time and memory limits on shell commands under Linux. If you receive the error "Error occurred during initialization of VM, Could not reserve enough space for object heap, Could not create the Java virtual machine.", try increasing the value of $wgMaxShellMemory .

rsvg の使用

On some Linux and BSD installations rsvg is renamed:

Instead of setting (default)

$wgSVGConverters = array( 'rsvg' => '$path/rsvg -w$width -h$height $input $output' );

you would like to set

$wgSVGConverters = array( 'rsvg' => '$path/rsvg-convert -w $width -h $height -o $output $input' );

JPEG

症状: 灰色のボックス内に次のエラーメッセージが表示される:

サムネイルの作成エラー: サムネイル引数が無効です

One cause: the number of pixels in the original image exceeding $wgMaxImageArea . The default value 1.25e7 is too small for many modern cameras. Too bad the diagnostic really doesn't hint at the problem.

You can increase the value of $wgMaxImageArea or switch to using ImageMagick which evades this restriction (set $wgUseImageMagick and $wgImageMagickConvertCommand ).

Large images can take significant processing time. It may be good policy to cap the size of images.

JPEG (GD を使用)

症状: 灰色のボックス内に次のエラーメッセージが表示される:

サムネイルの作成エラー: GDライブラリの構成が不完全です: 関数imagecreatefromjpegが不足

PHP 4.x や 5.x の一部のバージョンには、./configure ステップで libjpeg が検出されても有効化されないバグがあり、Red Hat/RHEL/CentOS システムでよく見られます。 ImageMagick を使用しない場合は、PHP を再コンパイルすることでこの問題を解決できます。 First, find out (from phpinfo()) what the existing ./configure switches were, and add --with-jpeg-dir before --with-gd.

make clean
./configure --with-various-switches --with-jpeg-dir --with-gd --with-more-switches
make
make test
# switch to root
make install

Afterwards, restart the webserver (for Apache on Red Hat: service apache stop then service apache start ). To test, simply view the File:... page again (no need to upload again). For more information see the comments on PHP: imagecreatefromjpeg (function synopsis)

サムネイルを保存先に保存できません

If you get the error "Error generating thumbnail / Error creating thumbnail: Unable to save thumbnail to destination" and the $wgUploadDirectory directory has the correct permissions (at all levels), check that $wgTmpDirectory actually exists. (Unlike some path variables such as $wgCacheDirectory , $wgTmpDirectory is not created at runtime.) A more detailed error message may be available if you turn on logging with $wgDebugLogFile .

This error can also occur when read only mode ($wgReadOnly ) has been set in LocalSettings.php. You can try to remove $wgReadOnly to see if that solves the issue for you.

Error creating thumbnail Error code: 25

If you get "Error creating thumbnail Error code: 25" with ImageMagick, try increasing $wgMaxShellFileSize .

サムネイルファイルを手動で追加する

In situations in which it's not feasible to create the thumbnails dynamically on request (e.g. for very large images, "Error creating thumbnail: unable to extend cache", "Error creating thumbnail: convert: no images defined", and similar), it is possible to manually add the thumbnail files. This involves creating the smaller images in the desired sizes and uploading them to the thumb/ directory in $wgUploadDirectory .

For example, a file that has uploaded to:

images/f/f8/Foo.png

should have its thumbnails at:

images/thumb/f/f8/Foo.png/100px-Foo.png
images/thumb/f/f8/Foo.png/600px-Foo.png

The pixel size is the horizontal dimension. An example Bash script for creating thumbnails is available at Phabricator:P7049.

Error creating thumbnail: Error code: -1 on OVH mutualized hosting

For unidentified reason, creation of thumbnails on some mutualized OVH hosting are failing with this error, even if running the command in SSH shell works.

Solution is to specifically prevent from using ImageMagick by setting $wgUseImageMagick to false in LocalSettings.php:

$wgUseImageMagick = false;

申し訳ありません! セッションデータが消失したため編集を処理できませんでした。 もう一度やり直してください。 それでも失敗する場合、ログアウトしてからログインし直してください。

コンテンツの制限

If your Apache server has the Hardened PHP patch, you may need to edit several variables in your /etc/php.ini file if you wish to have wiki pages with large amounts of content. In particular, consider the settings for varfilter.max_value_length, hphp.post.max_value_length, hphp.request.max_value_length. The default settings may limit your pages to less than 10k or 64k in size.

Another possibility is if your Apache server is using mod_security that could be interfering with MediaWiki. You will need to turn it off for MediaWiki to work properly.

You have not specified a valid user name / Completely blank page edits and previews / Unable to upload

This is caused by something truncating or dropping POST data from the browser to the web server.

In at least one instance, this was caused by post_max_size and upload_max_filesize in php.ini being set too high (2048M). Setting them back to more sane values (8M) fixed it. Apparently, no POST data was actually making it through to MediaWiki.

In another instance, mod_auth_sspi was interfering with http posts to MW. Using FireFox and entering domain credentials would work fine, but MSIE would fail. This is a known defect in mod_auth_sspi 1.0.4.

You have a few options to make this work:

  • Set SSPIOfferSSPI off ← users will get prompted and have to enter domain credentials, same as BASIC mode
  • Set SSPIPerRequestAuth on ← I don't see how this is a healthy configuration but it worked (except over the high latency connection I'm forced to contend with)
  • Downgrade to 1.0.3 but it's basically the same as #2 above.

ウィキにスタイルが適用されず、画像が表示されない

If the wiki looks fine if you browse it from the same server where it's being hosted but it appears without CSS styles applied (no colors, no backgrounds, no images, very minimal formatting, etc) if you access it from other machines (or some of them), the most probable cause is that the server is having problems with determining the IP or host name that is being used to access it, or it's misconfigured. This causes URLs to styles and images to be generated using the loopback IP address 127.0.0.1, localhost, or a host name not known outside of the server. You can see the source code of any page and check how URLs look like and what happens if you try to access them directly via your browser.

The solution is to manually specify the $wgServer variable to the host name that everyone will use to access the wiki.

If your wiki is being accessed from an internal network and an external one, you may need to use the external address for $wgServer. Don't forget the port number if you are using a non-standard port as may by the case if your ISP has blocked port 80 (Example: $wgServer = "http://example.domain.com:8080";)

If styles aren't applied even when browsing the wiki from the server where it's hosted, the problem may be a PHP error on the ResourceLoader load.php script. Try to browse the load.php file of your MediaWiki installation with your web browser and see if it displays any errors or just a blank page (see #You see a blank page). You should see a comment similar to /* No modules requested. Max made me put this here */. If so, it may be a problem with the web server's .htaccess file.

If you instead see a 404 Not found error, it may be a problem with the web server's rewrite rules if you attempted to configure Short URLs.

If you are getting 500 error responses from load.php urls, check the webserver's error log files to get more information of the errors. There seems to be a problem with some PHP versions and Gentoo that causes Apache to segfault.[1] This can also happen if you have APC enabled, setting apc.serializer=php in php.ini might help.[2]

Since MediaWiki 1.23, you may end with a wiki with most of the Vector-specific skin styles, like sidebar placed at the end of the page. That may be caused by a low pcre.backtrack_limit set up on some distributions like FreeBSD. It's known to have problems with values of 10,000. Increase that value to 100,000, or the current default of 1,000,000.

Since MediaWiki 1.26, some skins, and specially Vector, may have this problem. If you see the error Internal error Problematic modules: {"startup":"error"} in the error console of your browser, most likely cause is the lack of permissions of MediaWiki to write to the default temp folder, either because PHP has no permissions to write to /tmp (C:\WINDOWS\TEMP on Windows), or because there's an open_basedir restriction and that path isn't included on it. T119934 を参照してください。 You can also set $wgTmpDirectory if you are unable to change permissions on the system's default temp directory.

Error: invalid magic word 'speciale'

MediaWiki バージョン:
1.20

If you get that error message after upgrading, you must run the rebuildLocalisationCache.php maintenance script with the --force option:

php rebuildLocalisationCache.php --force

Localised strings show their message ID instead of a localized result

If you are seeing this, try running the rebuildLocalisationCache.php maintenance script with the --force option:

php rebuildLocalisationCache.php --force

This will force MediaWiki to rebuild the localisation cache.

編集ツールバーが表示されない、JavaScript が動作しない

MediaWiki 1.32 以降の MediaWiki には「JavaScript ベースの」ウィキテキストツールバーが組み込まれなくなりました。 「2006年版ウィキテキストエディター」として知られる古い「掲示板スタイルのツールバー」が廃止されたため、このような機能が必要な場合、システム管理者は利用可能な複数の拡張機能から1つ(または複数)を選択する必要があります。 MediaWiki の「tarball」リリースには長年にわたり、代替の拡張機能である WikiEditor 拡張機能(2010年版ウィキテキストエディター)が同梱されています。 この拡張機能がインストールされていることを確認してください。

JavaScript が動作しない(ページの編集時に編集ツールバーが表示されないなどの症状が見られる)場合は JavaScript エラーが原因である可能性があります。 ウェブブラウザーのエラーコンソールを開き(通常は F12 キーを押す)、ページを再読み込みしてエラーメッセージが表示されているか確認してください。 エラーが表示されている場合、通常、$wgShowExceptionDetails を設定することで詳細情報を確認できます。 システムの一時ディレクトリが書き込み不可になっていることが原因である場合もあります。 システムの既定の一時ディレクトリの権限を変更できない場合は、$wgTmpDirectory を設定してみてください。

Uncaught SyntaxError: Unexpected token <Error: SyntaxError: syntax error (...) Source Code: <script (...) のようなエラーが発生した場合、ホスティングプロバイダーが Load.php スクリプト(ResourceLoader が MediaWiki で使用するスクリプトや CSS を読み込むためのもの)内に追跡や広告用の HTML コードを自動的に挿入していることが主な原因です。 ホスティングプロバイダーにサポートチケットを発行し、この挿入を無効にするよう依頼してください。 困難な場合は別のホスティングプロバイダーにサイトを移行する必要があります。 この問題はほとんどの場合、無料のホスティングプロバイダーで発生します。

Every page displays a fatal error, Log shows "MagicWordArray::parseMatch: parameter not found"

Try rebuilding the Localisation Cache:

php maintenance/rebuildLocalisationCache.php

From this thread.

「アップロードしたファイルは内容が空のようです」というメッセージが表示され、すべてのアップロードが失敗する

It may be caused by wrong rewrite rules when configuring Short URLs. Try disabling them (and the related configuration variables of MediaWiki) to see if that solves the problem.

Another problem may be a limit imposed by the web server about how many data the server can receive on a single request. See Manual:Configuring file uploads#Set maximum size for file uploads for some configuration variables. If you have mod_security or suhosin installed, they may also be limiting the size of uploaded files, discarding the upload entirely without PHP noticing it.

Check also the upload_tmp_dir configuration directive from php.ini, and be sure that the folder has proper write permissions for the user account running PHP. On Windows, this directive often points to C:\Windows\TEMP, which may not be accessible in some circumstances. In that case, you can set up a different temp folder like C:\TEMP\ with proper permissions. To discard other problems, give temporarily all permissions to that folder (on Windows, add the local user group "Everyone" with full permissions), and then restrict the permissions as needed once you verify uploads are working.

If all uploads fail with the message アップロードしたファイルは内容が空のようです。 ファイル名の指定が間違っている可能性があります。 本当にこのファイルをアップロードしたいのか、確認してください。, and in the Apache error logs you have entries like this:

Notice: Undefined index: tmp_name in /srv/www/htdocs/mediawiki/includes/WebRequest.php on line 1153
Notice: Undefined index: size in /srv/www/htdocs/mediawiki/includes/WebRequest.php on line 1140
Notice: Undefined index: error in /srv/www/htdocs/mediawiki/includes/WebRequest.php on line 1167

This is a problem with the PHP version your server is using. There have been several reports of this problem with PHP 5.3.8 on SLES11 sp2. You may need to upgrade PHP or recompile it yourself.

WAMP/Apache on Windows: Some Special: pages are inaccessible

It may happen, on Windows installations under Apache, that some Special pages are inaccessible, giving a error, and in the logs you can see something like this:

[core:error] The given path is misformatted or contained invalid characters: [client 127.0.0.1] AH00127: Cannot map GET /wiki/Special:SpecialPages HTTP/1.1 to file

This can be caused by various PHP bugs. One of them is when the wiki is installed in a NTFS junction. If that's not the problem, upgrading PHP to a newer version can help (see this forum thread)

Attempting to save an edit gives you a 403 Forbidden error, or you get redirected to the main page

This is a common issue for shared host which have mod_security enabled. To know if it's a problem with mod_security or not, create a simple test page and save it with a small text (something as simple as writing just a dot in the content). If the edit is saved, but other edits aren't, that's caused by mod_security. Ask your hosting customer support to disable it completely or the rules affecting your edits.

If even saving a very simple edit gets you redirected to the main page, or to the same page without the edit appearing, it may be a problem with how you've set up $wgServer or some other configuration variable that controls the path of the index.php script, or conflicts with rewrite rules in your webserver's configuration.

You may get a message like MediaWikiではログインに Cookie を使用します。 Cookie を無効にしているようです。 Cookie を有効にしてから、もう一度試してください。.

If cookies aren't disabled on your browser, it could be one of those problems:

  • You have $wgSessionsInMemcached set to true but MediaWiki can't connect to Memcached. Turn off this setting or check the Memcached configuration.
  • A wrong cookie configuration. Configuration variables about cookies should work with their default values. Try to not override any of them.
  • session_save_path() is not set correctly on the server, or the server doesn't have permissions to write to that path.
  • If you use some sort of caching proxy in front of MediaWiki, check that it doesn't filter any cookie.
  • session.referer_check() is wrongly set. You should normally leave it empty.

Setting a debug log should display any cookie received by MediaWiki, so it may be a first step to detect if cookies are actually received by MediaWiki or not.

サムネイルの作成エラー: 12.5メガピクセルよりも大きな寸法のファイル

$wgMaxImageArea を増やすと問題が解決できるかもしれません(MediaWiki 1.26.2で試行済み)。

画像を開く時に内部サーバーエラーが発生する

If images are not displayed on the pages, and manually opening the URL of any image results in an Internal Server Error page, the problem is most likely caused by the .htaccess file from the images directory. This configuration file contains some rewrite rules to prevent old Internet Explorer versions from being affected by a cross site scripting vulnerability. However, some hosts like strato.de prevents disallow the RewriteOptions directive in .htaccess, causing any request for a file in the images folder to fail with an error. If you can't enable rewrite rules on .htaccess file, you may need to comment-out or remove those lines from .htaccess, or the entire .htaccess altogether. See this thread.

最近の更新に編集履歴が表示されない、最近の更新の内容が更新されない

既定では、最近の更新にボットによる編集を隠すフィルターが設定されています。このフィルターを解除して編集が表示されるかどうかを確認してください。

ボットによる編集の表示を有効にしても最近の更新に表示されない場合は、インストールされている拡張機能のいずれかに問題が発生しているため、最近の更新の内容を更新する際にエラーとなっている可能性があります。 編集などの操作を行った際、最近の更新はページがブラウザーに送信されるまで更新されません。 しかし、エラーが発生すると更新が中止され、利用者にエラーが表示されないことがあります。 このようなエラーを確認するには、デバッグログファイルを設定(診断が完了したら必ず無効にすること)してから、新しい編集内容をページに保存してみます。 エラーが発生した場合は、そのファイルにログが記録されるはずです(その他のいろいろなログも記録されるので注意)ので、「error」または「exception」を検索してみてください。 エラーは実行のスタックトレースを提供する場合があり、エラーの原因となる拡張機能を特定できる可能性があります。

拡張機能が実行中の MediaWiki のバージョンと互換性があることを確認してください。

カテゴリページや、特別:リンク元、ファイルの使用状況が更新されない

Information about pages contained in a category, links to other wiki pages and images embedded in pages are tracked in special tables. The update of such tables is not done immediately after the edit is saved, but deferred to the job queue for performance reasons. If it takes too long to update, you may need to adjust $wgJobRunRate , or try setting $wgRunJobsAsync to false in LocalSettings.php. This can happen in some installations, especially since MediaWiki 1.27 (see T142751).

Error: Could not open lock file for "mwstore://local-backend/local-public/./../image.png

Check that the "images" directory has permissions which allow writing. For example: chown -R www-data:www-data images and chmod -R 777 images. If you have SELinux enabled, this could also be problematic.

Notice: Did not find alias for special page 'Foo'. Perhaps no aliases are defined for it? [Called from SpecialPageFactory::getLocalNameFor in ...

You need to create an alias file. So, put something like this in your extension.json file:

	"ExtensionMessagesFiles": {
		"SpecialMyExt": "MyExt.alias.php"
	},
	"MessagesDirs": {
		"MyExt": [
			"i18n"
		]
	},

Then create an alias file like this:

MyExt.alias.php

<?php
/**
 * Aliases for Special:Foo
 *
 * @file
 * @ingroup Extensions
 */

$specialPageAliases = [];

/** English (English) */
$specialPageAliases['en'] = [
   'MyExt' => [ 'MyExt' ],
];

Make sure you don't have a $wgMessagesDirs item with the same key. Keys of $wgExtensionMessagesFiles which are also in $wgMessagesDirs will be skipped.

Warning: Invalid argument supplied for foreach() in ./includes/objectcache/SqlBagOStuff.php

Probably you just moved your wiki, and didn't import your database, so it's empty.

Warning: Invalid argument supplied for foreach() in ./includes/cache/localisation/LocalisationCache.php on line 459

To fix the warning, uncomment this line in LocalSettings.php:

#$wgCacheDirectory = "$IP/cache";

There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form.

未定義のメソッドの呼出し

If a MediaWiki extension shows this error after installing that MediaWiki extension, double-check that you downloaded the version or branch of that MediaWiki extension which matches the version or branch of your MediaWiki installation.

Unable to run external programs, proc_open() is disabled

The function has been disabled in php.ini. This prevents using ImageMagick to resize images to create thumbnails. Either contact your hosting provider, or try to use gd instead of ImageMagick by setting $wgUseImageMagick to false.

CAS update failed on user_touched for user ID '*' (read from slave); the version of the user to be saved is older than the current version

There are several reasons for this error. One simple one is if the content of user.user_touched is empty or is set to a time in the future.

You might want to check if the server's time is set correctly and synchronized. Also check the contents of that column and fill the column with valid content e.g. with this SQL statement:

UPDATE `user` SET user_touched='20260910015402'
WHERE HEX(
	user_touched
)='0000000000000000000000000000';
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- 0 が 28 個

Where the date is in YYYYMMDDHHMMSS format for the current date/time. See phab:T247751.

Lua エラー: 内部エラー

データベース クエリのエラーが発生しました。 これはソフトウェアのバグである可能性があります。

If you recently upgraded MediaWiki, or recently installed or upgraded extensions, try running the update.php maintenance script. (Manual:アップグレード も参照してください。)

If that doesn't help, then you really may have ran into a bug in the software. Try to obtain more details about the query that fails (Manual:デバッグの方法 ) and file a bug .

$wgSecretKey key is insecure, generated with mt_rand()

Your system does not support /dev/urandom so the key was generated with mt_rand(). $wgSecretKey を参照してください。

MediaWiki requires PHP 7.4.3 or higher; you are using PHP 7.3.17

If the PHP version on your web server should be recent enough, check if you have several PHP versions installed in parallel.

Create a file called info.php with the single-line content <?php phpinfo(); and place this file in the web directory. Access it with your web browser. It will display the PHP version that is used by your web server.

PHP のエラー

Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes)

Raise PHP's memory limit in php.ini:

memory_limit = 64M      ; Maximum amount of memory a script may consume (32MB)

You can add a higher value for $wgMemoryLimit in LocalSettings.php.

This error can often happen for other reasons. Look for Unicode usage on systems that do not support it properly. Look for the filename and line and if you find that you are in a language translation section that uses non-ascii characters, strip out that section. If you have increased the RAM allocated to PHP to 512MB and *still* have the problem with the memory error, it is not likely a memory issue per-se.

Fatal error: Invalid opcode 153/1/8. in xxx/includes/cache/MessageCache.php on line nnn

That issue seems to indicate it's a problem with a PHP code accelerator that doesn't match the installed version of PHP or it's outdated. Try upgrading the accelerator. report

Warning: Cannot modify header information - headers already sent by (...)

Most likely, your text editor added a byte order mark (BOM) while you edited MediaWiki's PHP files, but any other content before the opening <?php causes the same problem. This usually happens with LocalSettings.php - but see error message for exact file. Note that BOMs are invisible in most text editors. To remove the BOM, edit the file with something better than Windows Notepad, but if you don't really have time - open the file with it and choose Save as..., then choose "Unicode (UTF-8 Without signature) - Codepage 65001" as file type.

Strict Standards: date_default_timezone_get(): It is not safe to rely on the system's timezone settings.

If you get Strict Standards: errors in the HTML output, that's because your error_reporting configuration variable of PHP is set to E_ALL, but since PHP 5.4.0, E_STRICT became part of E_ALL. E_STRICT are not errors, but warnings about code interoperability and forward compatibility of PHP code, and they shouldn't be visible in production environments.

Just add your time zone to LocalSetting.php, e.g.

$wgLocaltimezone = 'Europe/Berlin';

The following does not work in all cases. It may be better to put this in the php.ini which must be present in all affected directories.

You may turn off E_STRICT errors putting the following line of code inside your LocalSettings.php , or in case a line with the error_reporting function exists, replace it with:

error_reporting( E_ALL & ~( E_STRICT | E_NOTICE ) );

You can turn off PHP error reporting entirely using this instead:

error_reporting( 0 );

See also: Setting error reporting in PHP.

If nothing works, please check at the start of your LocalSettings.php file: If that error happened on the setup process, the LocalSettings.php that it generated could have included the error message at the top of it (example). If that was what happened, edit the file removing everything before "<?php" and verify there's nothing (even whitespace) before "<?php".

Fatal Error: Cannot redeclare wfprofilein()

This could happen if you upgraded and you have a StartProfiler.php file in the root MediaWiki installation directory, probably because you enabled profiling in an old installation. To solve the issue simply remove that file.

インストール エラー

LocalSettings.php が読み込めない

  • On a Linux machine, use chown or chgrp to correct the file permissions of LocalSettings.php.
  • On some Linux machines, temporarily disable SELinux by running the command sudo setenforce 0.

The installer is unstyled when installing under IIS

The installer is unstyled and instead of the stylesheet, /mw-config/index.php?css=1 shows this error message: "Less_Exception_Parser from line 447 of ...\vendor\oyejorge\less.php\lib\Less\Parser.php: Less.php cache directory isn't writable: C:\Windows\TEMP"

Make sure that the webserver user, who by default is named IUSR, is allowed to access the C:\Windows\TEMP directory. At least read and write permissions are necessary.

Error selecting database wikidb: 1044 Access denied for user 'username'@'localhost' to database 'wikidb'

You need to Grant permissions on wikidb.*.

GRANT ALL ON wikidb.* TO 'username'@'localhost' IDENTIFIED BY 'password';

or if your Web Server is on a different box than your DB server - you have to configure remote access to MySQL and grant differently

GRANT ALL ON wikidb.* TO 'username'@'192.168.0.x' IDENTIFIED BY 'password';

NOTE: Replace 192.168.0.x with your Webserver's IP. Also note that the apostrophes (') need to stay.

Database returned error "1142: CREATE command denied to user 'username'@'localhost' for table 'user_properties' (localhost)"

As above, or temporarily use the mysql root user.

適切なデータベース ドライバーが見つかりませんでした!

PHP の MySQL サポートがインストール/有効化されていません - https://php.net/book.mysqli を参照してください。 オペレーティングシステムによっては、追加パッケージをインストールする必要がある場合があります。 例えば、debian/ubuntu では sudo apt install php-mysql を実行します。

Filename Case Errors

If you are using a different FTP client than FileZilla to upload files to your server, be sure to configure the client to not force uppercase or lowercase filenames. MediaWiki filenames are case-sensitive.

Incomplete Upload Errors

The MediaWiki package includes a lot of files, spread over dozens of directories. Be careful when uploading. If the transfer is interrupted, you might have missing or incomplete files. You may have to retry your upload several times, especially if you have an unreliable connection.

If your webserver produces a "403 Forbidden error" page and you are using symbolic links, then make sure your Apache httpd.conf file has Options FollowSymLinks to allow symbolic links and that each directory leading up to your linked directory has +x permission for user running httpd.

HTTP 500 Internal Error during installation

If your webserver produces a "500 Internal Error" at the beginning of the install process, you may need to change the permissions on the mw-config directory to 755. If you have changed the permissions for the config directory and still get an unwritable error try changing the owner to Apache.

chown -R apache:apache /var/www/html/mediawiki/*

HTTP 500 Internal Error after installation

If you downloaded the MediaWiki code from Git, and after finishing the installation process, accessing your MediaWiki installation in the web browser produces a "500 Internal Error", go to the MediaWiki installation folder and running the following commands:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

SELinux

メインのページ: SELinux

Linux distributions which support SELinux ('Security Extensions') are becoming more widespread. On such systems, PHP scripts will still be unable to write to the config directory, after you have set the normal file permissions. You will also need to use the 'chcon' command to change the SELinux file type.

Required Advertisements on Hosted Sites

If you are running the MediaWiki software on a free site that requires banners or prefix advertising, this may cause MediaWiki not to work, and appear to only generate empty pages beyond the banner advertising. You will have to contact your host to make them make their advertising compatible with MediaWiki, or choose a different host.

Debian, Apache2, and PHP

If you are running the MediaWiki software on Debian with Apache2 and PHP5, and have problems connecting to MySQL, e.g you get the following error message in your browser: (Can't contact the database server: MySQL functions missing, have you compiled PHP with the --with-mysqli option?) try uncommenting: extension=mysqli.so in the /etc/php5/apache2/php.ini file.

If that does not work, try the following...

Check that MySQL module for php is installed:

dpkg --list | grep php-mysql

If you need to install the php5-mysql module enter:

apt-get install php-mysql

Then restart Apache2:

/etc/init.d/apache2 restart

'user_password' can't have a default value

Ensure that MySQL is not running in strict mode.

Missing table prefix

If you are using a hosting service, the database name and database username may have an extra prefix (normally the userid given by your hosting provider). For example, if you have created a database named db01 with username u01 and your userid is ocom (given by your hosting provider), you should enter the database name and database username as ocom_db01 and ocom_u01 respectively.

MySQL connection fails with error [2013] or [2002]

If you are getting the error: failed with error [2013] Lost connection to MySQL server during query. or failed with error [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)., this may be caused by using the wrong database host name or by a permissions issue with the mysql.soc file or directory.

If you are using a hosting provider, ensure that you are using the correct host name for the database.

The MySQL manual has a good set of pages on dealing with common errors (such as these). Visit the page for links to documentation for other versions of MySQL.

If you are unsure if MySQL is even installed, try the command mysql from the command line; if it is not installed, see Manual:Running MediaWiki#System-specific instructions.

UNIX utility binaries not found

Errors include:

  • GNU diff3 not found
  • Git version control software not found
  • ImageMagick not found

PHP must have access to /usr/bin. In php.ini (probably /etc/php/php.ini), add :/usr/bin/ to open_basedir config variable as below:

open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/var/www/:/usr/bin/

To disable GIT set $wgGitBin to a path that's allowed but doesn't exist.

$wgGitBin = "";

"Forbidden: You don't have permission to access /mediawiki/ on this server."

This is usually an issue with the configuration of your web server software and unrelated to MediaWiki itself. See for example this Stackoverflow thread or other web server forums.

Too many redirects (ERR_TOO_MANY_REDIRECTS)

When this happens on every page, this is usually caused by a wrong Manual:短縮URL configuration, usually because of an error in a redirect rule.

This can also happen when $wgForceHTTPS is set to true, and somehow MediaWiki isn't properly detecting the protocol used by the client, and keeps sending a redirect to https:. This may happen when MediaWiki is set behind a reverse proxy that isn't setting the X-Forwarded-Proto HTTP header to https.

アップデートのエラー

Missing rc_timestamp field of recentchanges table. Should not happen.

Might e.g. happen on upgrading from MW 1.27 to another version. If there is no database content at all you might see this message. phab:T236671 を参照してください。

This may happen if you didn't specify the same $wgDBprefix as your original installation, causing MediaWiki to not find its tables. Check the existing tables on the database and see if they all share a common prefix, and update that setting accordingly.

Another cause may be that you set an empty database. Reinstall the database content from a backup and proceed with migrating.

"Can not upgrade from versions older than 1.31, please upgrade to that version or later first" (or variants)

Some upgrades cannot be performed without an intermediary upgrade. For instance, to upgrade from a wiki older than 1.33 to MW 1.39.1, you will need to upgrade to 1.35 first. See task phab:T326071.

This error message can also be a red herring. It may appear when you are trying to update an empty database, without tables. Create the database first by installing the wiki .

ビジュアルエディターの使用

脚注

関連項目