Manual:Errors and symptoms/ja

Jump to navigation Jump to search



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


Error reports may include:

  • "Warning [...] It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function." Check if date.timezone = is set correctly (or set at all) in PHP.ini.
  • Certain files may be reported as missing (e.g. when the media folder in your /includes folder is no longer present, you may receive the message that a required imaging process "failed to open stream"). Check the original installation package at MediaWiki (make sure to consult the appropriate version) to see if this is the case. If so, simply copy the missing files from the package into your MediaWiki directory. It may be necessary to refresh the cache and restart the webserver afterwards.
  • MySQL socket cannot be found. If LocalSettings.php is set to the correct MySQL socket but php.ini is not, it may result in a blank screen with no error output from the webserver or php. The fix is to update the mysql.default_socket entry in the php.ini file.

多くの人は最近のバージョンのwikiに記事を投稿した後に空白ページを報告します。よくある原因はPHPのメモリ制限です(通常は8MBに設定されています)。PHPとApacheエラーログを確認するようお願いします。この設定を修正するために/etc/php.iniを編集して"memory_limit"で設定されているメモリー量を増やしてください。32MBに増やしたい場合、"memory_limit = 32M"とします。この値を変更した後にApacheサーバーを再起動してください。

The memory limit may also have been set in your LocalSettings.php file. Scan for the line containing the memory_limit setting and increase as needed. 20M may not be enough if you are running version 1.15.1. Change it to e.g. "memory_limit = 32M". This change does not require you to restart apache.

If the page just hangs loading during some time (like 30 seconds) doing a specific action, and then it results in a blank page or HTTP 500 error, the problem is a timeout connecting to some server. This may be the database server, or if it happens doing a specific action, the mail server (if you have configured email settings). If it's the email server, check if you can connect to it from the server running MediaWiki, for example, running the Telnet client to the server and port configured on $wgSMTP and seeing if it can connect.

MediaWiki のエラー[edit]

All pages have no content, but when editing a page the wiki text is there[edit]

Optionally with those error messages:

PHP Warning: preg_replace(): Compilation failed: group name must start with a
  non-digit at offset 4 in /var/www/wiki/htdocs/includes/MagicWord.php

This is caused by a change in PCRE 8.34. You need to update MediaWiki to a supported version. The problem is solved in all currently supported versions of MediaWiki (see タスク T60640).

See report: Topic:Rz2zo0m88rrxqrfn and Thread:Project:Support_desk/MediaWiki_don't_work_with_PCRE_8.34_(2)

Image Thumbnails not working and/or appearing[edit]

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");

Be sure there's no $wgShellLocale defined in your LocalSettings.php, or add also this:

$wgShellLocale = "C.UTF-8";


See also: Manual:画像の管理

First, determine your $wgSVGConverter setting. By default, it is set to use ImageMagick for conversion.

ImageMagick の使用[edit]

You need at least ImageMagick 6.x.x. Ensure that your $wgImageMagickConvertCommand variable is valid. Common settings are:

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

If it does not work, try setting $wgSVGConverterPath .

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

Shared hosts may provide different ImageMagick versions to meet the needs of different users. Please use version 6.x.x.

  • To determine the version of ImageMagick, search the help files of your host provider, or use /usr/bin/convert --version or /usr/local/bin/convert --version to detect.
  • On GoDaddy Linux shared hosts, "/usr/bin/convert" for Version 5.5.6 and "/usr/local/bin/convert" for Version 6.2.8.

If generating thumbnails with ImageMagick fails with a web server error log message like "Memory allocation failed" or "/bin/ 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 accoring to this

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

Batik の使用[edit]

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 の使用[edit]

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' );


Symptom: This error message within a grey box:

Error creating thumbnail: Invalid thumbnail parameters

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 (using GD)[edit]

Symptom: This error message within a grey box:

Error creating thumbnail: Incomplete GD library configuration: missing function imagecreatefromjpeg

Some PHP 4.x and 5.x versions of PHP have a bug where the libjpeg is detected but not enabled during the ./configure step; this is fairly prevalent on Red Hat/RHEL/CentOS systems. The fix for this (if you don't want to use ImageMagick) is to recompile 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 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)

Unable to save thumbnail to destination[edit]

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.

Manually adding thumbnail files[edit]

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" 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:


should have its thumbnails at:


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

Sorry! We could not process your edit due to a loss of session data. Please try again. If it still doesn't work, try logging out and logging back in.[edit]

See Manual:How to debug/Login problems.


ApacheサーバーがHardened PHP patchを使用しており、Wikiが大容量のページを持てるようにしたい場合、/etc/php.iniファイルにあるいくつかの変数を編集する必要があることがあります。とりわけ、varfilter.max_value_length、とhphp.request.max_value_lengthの設定を考えてください。デフォルトの設定は10Kまたは64k以下にページサイズを制限している可能性があります。

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[edit]

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.

The wiki appears without styles applied and images are missing[edit]

If the wiki looks fine if you browse it from the same server where it's being hosted but it appears without 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, 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 = "";)

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 (see here Manual:Load.php).

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're 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 limit of pcre.backtrack_limit set up on some distributions like FreeBSD. It's known to have problems with values of 10000. Increase that value to 100000, or the current default of 1000000.

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. See タスク T119934. You can also set $wgTmpDirectory if you're unable to change permissions on the system's default temp directory.

Error: invalid magic word 'speciale'[edit]

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

php rebuildLocalisationCache.php --force

This can happen at least upgrading to 1.20.

Missing edit toolbar, JavaScript not working[edit]

Note: Since MediaWiki 1.32, MediaWiki no longer has a "JavaScript-powered" wikitext toolbar built in. The old "bulletin board style toolbar", known as "the 2006 wikitext editor", has been removed, and instead sysadmins will be required to choose one (or more) of the several extensions available for this purpose if they need the functionality. The MediaWiki "tarball" releases have included the replacement extension for this, the WikiEditor extension aka "the 2010 wikitext editor", for many years now. Be sure this extension has been installed.

If JavaScript is not working (one of the symptoms is the edit toolbar not appearing when editing a page) it may be caused by a JavaScript error. Open the error console of your web browser (usually by hitting F12), reload the page and see if any error message appears there. If it displays an error, usually, setting $wgShowExceptionDetails would give you more information. Sometimes the problem is that the system's temp directory is not writable. In that case, you can also set $wgTmpDirectory if you're unable to change permissions on the system's default temp directory.

If you get errors like Uncaught SyntaxError: Unexpected token < or Error: SyntaxError: syntax error (...) Source Code: <script (...), the cause is usually a hosting provider that is automatically injecting HTML code for tracking or advertising inside the load.php script, which is used by ResourceLoader to load the scripts and CSS used by MediaWiki. Open a support ticket with your hosting provider asking them to disable that injection. If that's not possible, you should migrate your site to another hosting provider. That usually happens on free hosting providers.

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

Try rebuilding the Localisation Cache:

 php maintenance/rebuildLocalisationCache.php

From this thread.

All uploads fail with the message "The file you uploaded seems to be empty..."[edit]

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 The file you uploaded seems to be empty. This might be due to a typo in the filename. Please check whether you really want to upload this file., 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: 特別ページの一部にアクセスできない[edit]

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] 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[edit]

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.

Login page warns about cookies disabled[edit]

You may get a message like MediaWiki uses cookies to log in users. You have cookies disabled. Please enable them and try again..

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.

MediaWiki does not function when magic quotes are enabled[edit]

MediaWiki バージョン: 1.23

MediaWiki バージョン: 1.24

Magic quotes is a feature in PHP that is scheduled to be deprecated in PHP 5.3 and removed in PHP 5.4. If you get this error, you need to disable the magic quotes in your server setting. See how to do it. Since MW 1.24.

Discussions: Thread:Project:Support_desk/Problems_with_installing_mediawiki, Topic:S79xdn9u15xw55vj, Topic:Sdpbmy9q9e0ttp6k, Topic:S7g4rybniat2i36e, Topic:S6vqwk0tysl6m8lc

Error creating thumbnail: File with dimensions greater than 12.5 MP[edit]

It may help to increase $wgMaxImageArea to get rid of the problem (tried with MediaWiki 1.26.2).

Internal Server Error when opening any image[edit]

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 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 Topic:Uye1450mvn00f4y1.

Category pages, Special:Whatlinkshere and file usage aren't being updated[edit]

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 specially in some installations since MediaWiki 1.27 (see タスク T142751).

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

Check that the "images" directory has permissions which allow writing. 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 ...[edit]

You need to create an alias file. So, put something like this in your extension file (e.g. /extensions/Foo/Foo.php):

$wgExtensionMessagesFiles['FooAlias'] = __DIR__ . '/Foo.alias.php';

Then create an alias file like this:

 * Aliases for Special:Foo
 * @file
 * @ingroup Extensions
// @codingStandardsIgnoreFile

$specialPageAliases = array();

/** English (English) */
$specialPageAliases['en'] = array(
   'Foo' => array( 'Foo' ),

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[edit]

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

PHP エラー[edit]

Fatal error: Allowed memory size of nnnnnnn bytes exhausted (tried to allocate nnnnnnnn bytes)[edit]

memory_limit = 64M      ; スクリプトが消費するメモリの最大量です(32MB)
MediaWiki バージョン: 1.16

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

MediaWiki バージョン: 1.15

Note 1: In versions 1.15 and earlier, the memory limit in php.ini may be overridden by default in LocalSettings.php with the line:

ini_set('memory_limit', '20M');

You may increase the memory limit here, or comment this line out in LocalSettings.php to use the limit specified in php.ini.

Note 2: 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.

Read here for more information on configuring resource limits in PHP.

Fatal error: Class 'DOMDocument' not found in xxxxxxxx/Preprocessor_DOM.php on line nnn[edit]

This error happens when PHP hasn't been compiled with DOM support, or the DOM/xml extension is missing.

  • Install the right php-xml package for your distro. Example: sudo yum install php-xml
  • Alternatively, change the MediaWiki 'preprocessor' class in LocalSettings.php (see $wgParserConf )
$wgParserConf['preprocessorClass'] = 'Preprocessor_Hash';

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

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 (...)[edit]

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.[edit]

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 of 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 errors 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()[edit]

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.

Warning: Inaccessible files[edit]

After your move, you might see PHP warnings that certain files could not be accessed. This is most likely caused by タスク T37472: The column md_deps in the module_deps table contains absolute file paths, which are used to locate the images and LESS files that CSS depends on. These paths break when the wiki is, e.g., moved to another folder or another server. Until this bug is solved, you can use this workaround to manually fix wrong entries in the module_deps table:

-- Update entries in module_deps table
SET @old='';
SET @new='';

UPDATE `module_deps` SET `md_deps` = REPLACE( `md_deps`, @old, @new );

This can be used to update wrong path segments and to fix the error.

MediaWiki バージョン: 1.17 – 1.26

A similar issue can happen when MediaWiki tries to read resource loader messages. In this case the solution is to truncate the according tables:

-- Truncate message related caches
TRUNCATE TABLE `msg_resource`;
TRUNCATE TABLE `msg_resource_links`;


The installer is unstyled when installing under IIS[edit]

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'[edit]

wikidb.*にパーミッションを与える必要があります - Manual:Installation#MySQLをご覧ください
GRANT ALL ON wikidb.* TO 'username'@'localhost' IDENTIFIED BY 'password';

またはウェブサーバーがDBサーバーとは異なるボックス上にある場合 - MySQLにリモートアクセスをする権限を設定しなければなりません

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

注意: 192.168.0.xをあなたのウェブサーバーのIPアドレスに書き換えてください

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

As above, or temporarily use the mysql root user.

Could not find a suitable database driver![edit]

PHPのMySQLサポートがインストールされていない/有効になっていません - をご覧ください





シンボリックリンクによる403 Forbidden[edit]

ウェブサーバーが"403 Forbidden error"を出力してシンボリックリンクを使用している場合、Apacheのhttpd.confファイルがシンボリックリンクを許可するためにOptions FollowSymLinksを設定をしていて、リンクをされたディレクトリを下準備しているそれぞれのディレクトリがユーザが動作させるhttpdのために+xパーミッションを持っていることを確認してください。

Internal Error during installation[edit]

インストール作業の始めにウェブサーバーが"500 Internal Error"を返す場合、configフォルダのパーミッションを755に変更する必要があることがあります。configディレクトリのためにパーミッションを変更した場合、まだ書き込みできないエラーを得る場合、所有者をapacheに変更してみてください。

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


SELinux('Security Extensions')をサポートするLinuxディストリビューションはより広まっています。それらのシステム上では、PHPスクリプトは通常のファイルパーミッションを設定した後で、configディレクトリに書き込むことはできません。SELinuxファイルタイプを変更するために'chcon'コマンドも使用する必要があります。SELinuxをご覧ください。


MediaWiki ソフトウェアをバナーの設置または広告の前置を要求する無料サイト上で動作させる場合、このことが原因で MediaWiki が動作せず、バナー広告を越えて空のページだけを生成することがあります。このことに対する修正は将来なされます。それまでの間、唯一の選択は有料ホスティングサイトを見つけることです。これはバグとも考えられ、報告されます。


If you're running the MediaWiki 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-mysql option?) try uncommenting: ';' in the '/etc/php5/apache2/php.ini' file.

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

Check that MySQL module for php5 is installed:

dpkg --list | grep php5-mysql

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

apt-get install php5-mysql

Then restart Apache2:

/etc/init.d/apache2 restart

'user_password' can't have a default value[edit]

MySQLがstrict modeで動いていないことを確認してください。


"experimental UTF-8"を選択した場合、"specified key was too long"のタイプのMySQLが起こることがあります。解決する方法の一つはmaintenance/tables.sqlを編集して、問題を起こしているテーブルがより短いキーを使用するようにします。(MediaWikiのバージョンによって、tables.sqlも編集する必要があります; 例えば、MySQL 5で1.6.10を使用する場合、maintenance\mysql5\tables.sqlです。)

例えば、次のようなエラーメッセージを見る場合です: PRIMARY KEY job_id (job_id), KEY (job_cmd, job_namespace, job_title) ) TYPE=InnoDB " failed with error code "Specified key was too long; max key length is 1024 bytes (localhost)".

tables.sqlで"job"テーブルを見つけ、KEY (job_cmd, job_namespace, job_title)KEY (job_cmd(160), job_namespace, job_title(160))のようなもので置き換えます。

(ポイントはvarcharフィールドを3倍にするときでも(UTF-8の文字は3バイト使用するので)、すべてのKEY宣言のすべてのフィールドの全体の長さはエラーメッセージで述べられた最大のキーサイズよりも小さくすることです。)例えば、job_cmdがvarchar(255)、job_namespaceがint、job_titleがvarchar(255)であるとすると、KEY (job_cmd, job_namespace, job_title)の全体のキーの長さは3*255 + 4 + 3*255 = 1534で、1024より大きいので、3*160 + 4 + 3*160 = 964に置き換えればOKです。)

tables.sqlを修正した後で、前に作成したすべてのテーブルをドロップして、インストールスクリプトを再実行しなければなりません(エラーメッセージのページをリロードします。この方法ではすべてを再入力する必要はありません)。いくつかのテーブルでこのエラーを得た場合 - jobとpage_restrictionsは影響受ける可能性があるものです。

See also タスク T6445.

テーブルの接頭辞(table prefix)が見つからない[edit]


Class SkinStandard not found; skipped loading[edit]

If pages are displayed without skins, try enabling logging by adding $wgDebugLogFile = "/tmp/wiki.log"; to your LocalSettings.php. If you get an error like “Class SkinStandard not found; skipped loading,” try the symlink suggestion at What worked for me was:

sudo ln -s /usr/share/mediawiki/skins/ /var/www/wiki/

MySQL の接続がエラー [2013] または [2002] で失敗する[edit]

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.



  • 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 = "";