Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Get MediaWiki
Get extensions
Tech blog
Contribute
Support
User help
FAQ
Technical manual
Support desk
Communication
Development
Developer portal
Code statistics
mediawiki.org
Community portal
Recent changes
Translate content
Random page
Village pump
Sandbox
Search
English
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Export translations
Translate
English
Language statistics
Message group statistics
Export
Tools
Tools
move to sidebar
hide
Actions
Language statistics
Message group statistics
Export
General
Upload file
Special pages
Printable version
Get shortened URL
Download QR code
<languages/> {{InstallationNav}} {{See also|Manual:How to debug}} __TOC__ <div lang="en" dir="ltr" class="mw-content-ltr"> ==You see a blank page== </div> <span lang="en" dir="ltr" class="mw-content-ltr">A blank white page indicates a PHP error which isn't being printed to the screen.</span> <span lang="en" dir="ltr" class="mw-content-ltr">To force this, add the following lines to the <code>LocalSettings.php</code> file, underneath the {{code|lang=php|inline=yes|<?php}}:</span> <syntaxhighlight lang="php"> error_reporting( E_ALL ); ini_set( 'display_errors', 1 ); </syntaxhighlight> <span lang="en" dir="ltr" class="mw-content-ltr">You can also set a value for <code>error_log</code> in <code>PHP.ini</code> and read the PHP error log to find out what's going on.</span> <span lang="en" dir="ltr" class="mw-content-ltr">In some cases, PHP errors might also be recorded in the web server error log.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> Error reports may include: </div> *<span lang="en" dir="ltr" class="mw-content-ltr">"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."</span> <span lang="en" dir="ltr" class="mw-content-ltr">Check if <code>date.timezone =</code> is set correctly (or set at all) in <code>php.ini</code>.</span> *<span lang="en" dir="ltr" class="mw-content-ltr">Certain files may be reported as missing (e.g. when the <code>media</code> folder in your <code>/includes</code> folder is no longer present, you may receive the message that a required imaging process "failed to open stream").</span> <span lang="en" dir="ltr" class="mw-content-ltr">Check the original installation package at MediaWiki (make sure to consult the appropriate version) to see if this is the case.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If so, simply copy the missing files from the package into your MediaWiki directory.</span> <span lang="en" dir="ltr" class="mw-content-ltr">It may be necessary to refresh the cache and restart the webserver afterwards.</span> *<span lang="en" dir="ltr" class="mw-content-ltr">MySQL socket cannot be found.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If <code>LocalSettings.php</code> is set to the correct MySQL socket but <code>php.ini</code> is not, it may result in a blank screen with no error output from the webserver or PHP.</span> <span lang="en" dir="ltr" class="mw-content-ltr">The fix is to update the <code>mysql.default_socket</code> entry in the <code>php.ini</code> file.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Many people report blank pages in recent versions after submitting articles to their new wiki.</span> <span lang="en" dir="ltr" class="mw-content-ltr">A likely cause is the memory limit in default php installations (usually 8 MB).</span> <span lang="en" dir="ltr" class="mw-content-ltr">Please check your PHP and/or Apache error logs.</span> <span lang="en" dir="ltr" class="mw-content-ltr">To modify this setting edit <code>/etc/php.ini</code> and increase the "memory_limit" setting.</span> <span lang="en" dir="ltr" class="mw-content-ltr">For example to raise it to 32 MB replace the existing text with <code>memory_limit = 32M</code>.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Make sure to restart your webserver after you have changed this value.</span> <span lang="en" dir="ltr" class="mw-content-ltr">The memory limit may also have been set in your <code>LocalSettings.php</code> file.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Scan for the line containing the memory_limit setting and increase as needed.</span> <span lang="en" dir="ltr" class="mw-content-ltr">20M may not be enough if you are running version 1.15.1.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Change it to e.g. "<code>memory_limit = 32M</code>".</span> <span lang="en" dir="ltr" class="mw-content-ltr">This change does not require you to restart Apache.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <span lang="en" dir="ltr" class="mw-content-ltr">This may be the database server, or if it happens doing a specific action, the mail server (if you have configured email settings).</span> <span lang="en" dir="ltr" class="mw-content-ltr">If it's the email server, check if you can connect to it from the server running MediaWiki, for example, running the [[w:Telnet|Telnet]] client to the server and port configured on {{wg|SMTP}} and seeing if it can connect.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If you can see the page contents briefly, and suddenly the entire page goes blank, most likely the problem is caused by the presence of a <code>document.write</code>, <code>document.writeln</code>, or <code>document.open</code> JavaScript instruction in one of the scripts of the wiki.</span> <span lang="en" dir="ltr" class="mw-content-ltr">You can check if that's the case if you open your browser console (hit F12) and reload the page.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If the network tab returns a HTTP 200 status, and the transfer is of several kilobytes, it's very likely this is the problem.</span> <span lang="en" dir="ltr" class="mw-content-ltr">These are legacy methods of the <code>Document</code> interface that cause the entire page to become blank if it's used outside of the page HTML, and it may be present on the [[Special:MyLanguage/Manual:Interface/JavaScript|wiki's JavaScript pages]].</span> <span lang="en" dir="ltr" class="mw-content-ltr">Their usage is strongly discouraged, as indicated by the [https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#document.write() HTML specification itself].</span> <span lang="en" dir="ltr" class="mw-content-ltr">You can disable JavaScript on your browser, or set {{wg|UseSiteJs}} and {{wg|AllowUserJs}} to false to disable those scripts until you fix the broken scripts.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ==MediaWiki Errors== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> === All pages have no content, but when editing a page the wiki text is there === </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Optionally with those error messages: </div> 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 <span lang="en" dir="ltr" class="mw-content-ltr">This is caused by a change in [[w:Perl Compatible Regular Expressions|PCRE]] 8.34, which no longer allows names of capturing groups to start with a digit.</span> <span lang="en" dir="ltr" class="mw-content-ltr">You need to [[Special:MyLanguage/Manual:Upgrading|update MediaWiki]] to a supported version.</span> <span lang="en" dir="ltr" class="mw-content-ltr">See {{ll|Updating to PCRE 8.33 or Higher}}.</span> <span lang="en" dir="ltr" class="mw-content-ltr">The problem is solved in all currently supported versions of MediaWiki (see {{phabricator|T60640}}).</span> <span lang="en" dir="ltr" class="mw-content-ltr">PCRE 8.33 and 8.34 were released in the year 2013.</span> <span lang="en" dir="ltr" class="mw-content-ltr">See report:</span> [[Topic:Rz2zo0m88rrxqrfn]], [[Thread:Project:Support desk/MediaWiki don't work with PCRE 8.34 (2)]] <div lang="en" dir="ltr" class="mw-content-ltr"> ===Image Thumbnails not working and/or appearing=== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> This section lists problems and solutions relating to thumbnails not rendering or displaying. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== Error creating thumbnail: File missing: ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> This might happen due to wrong values of global variables as explained in: </div> * {{ll|Manual:$wgUploadDirectory}} * {{ll|Manual:$wgUploadPath}} * {{ll|Manual:$wgScriptPath}} <div lang="en" dir="ltr" class="mw-content-ltr"> ==== Decimal-point in srcset locale bug ==== </div> <span lang="en" dir="ltr" class="mw-content-ltr">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 "<code>srcset</code>".</span> <span lang="en" dir="ltr" class="mw-content-ltr">If you find something like <code><nowiki><img ... srcset="/images/thumb/File.png/600px-File.png 1,5x, /images/thumb/File.png/800px-File.png 2x"></nowiki></code>, where it appears <code>1,5x</code> instead of <code>1.5x</code>, the problem is caused by {{phabricator|T181987}}, and you should add this to LocalSettings.php:</span> <syntaxhighlight lang="php"> setlocale(LC_NUMERIC, "C"); </syntaxhighlight> <span lang="en" dir="ltr" class="mw-content-ltr">Be sure there's no {{wg|ShellLocale}} defined in your LocalSettings.php, or add also this:</span> <syntaxhighlight lang="php"> $wgShellLocale = "C.UTF-8"; </syntaxhighlight> <div lang="en" dir="ltr" class="mw-content-ltr"> ====SVG==== </div> :{{See also|Manual:Image administration#SVG|ll=1}} <span lang="en" dir="ltr" class="mw-content-ltr">First, determine your {{wg|SVGConverter}} setting.</span> <span lang="en" dir="ltr" class="mw-content-ltr">By default, it is set to use ImageMagick for conversion.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== Using ImageMagick ===== </div> <span lang="en" dir="ltr" class="mw-content-ltr">You need at least ImageMagick 6.x.x.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Ensure that your {{wg|ImageMagickConvertCommand}} variable is valid.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Common settings are:</span> <syntaxhighlight lang="php"> $wgImageMagickConvertCommand = "/usr/bin/convert"; $wgImageMagickConvertCommand = "/usr/local/bin/convert"; </syntaxhighlight> <span lang="en" dir="ltr" class="mw-content-ltr">If it does not work, try setting {{wg|SVGConverterPath}}.</span> <syntaxhighlight lang="php"> $wgSVGConverterPath = "/usr/bin"; $wgSVGConverterPath = "/usr/local/bin"; </syntaxhighlight> <span lang="en" dir="ltr" class="mw-content-ltr">Shared hosts may provide different ImageMagick versions to meet the needs of different users.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Please use version 6.x.x.</span> *<span lang="en" dir="ltr" class="mw-content-ltr">To determine the version of ImageMagick, search the help files of your host provider, or use <code>/usr/bin/convert --version</code> or <code>/usr/local/bin/convert --version</code> to detect.</span> *<span lang="en" dir="ltr" class="mw-content-ltr">On [http://www.godaddy.com GoDaddy] Linux shared hosts, "/usr/bin/convert" for Version 5.5.6 and "/usr/local/bin/convert" for Version 6.2.8.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> 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 {{wg|MaxShellMemory}} value may need to be increased. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> When the path is missing non-ASCII characters </div> * <span lang="en" dir="ltr" class="mw-content-ltr">Check if UTF-8 locals are available on your server by running <code>locale -a</code></span> * <span lang="en" dir="ltr" class="mw-content-ltr">When it's not available run <code>locale-gen en_US.utf8</code> or put in the locales with UTF-8 for your country and change the value for {{wg|ShellLocale}} according to this.</span> <span lang="en" dir="ltr" class="mw-content-ltr">When using IIS/FastCGI on Windows, the guest account that is used also needs execute permission on C:\Windows\System32\cmd.exe otherwise you'll receive an "Unable to Fork" error.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== Using Batik ===== </div> <span lang="en" dir="ltr" class="mw-content-ltr">MediaWiki places time and memory limits on shell commands under Linux.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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 {{wg|MaxShellMemory}}.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== Using rsvg ===== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> On some Linux and BSD installations rsvg is renamed: </div> <span lang="en" dir="ltr" class="mw-content-ltr">Instead of setting (default)</span> <syntaxhighlight lang="php"> $wgSVGConverters = array( 'rsvg' => '$path/rsvg -w$width -h$height $input $output' ); </syntaxhighlight> <span lang="en" dir="ltr" class="mw-content-ltr">you would like to set</span> <syntaxhighlight lang="php"> $wgSVGConverters = array( 'rsvg' => '$path/rsvg-convert -w $width -h $height -o $output $input' ); </syntaxhighlight> <div lang="en" dir="ltr" class="mw-content-ltr"> ====JPEG ==== </div> <span lang="en" dir="ltr" class="mw-content-ltr">Symptom:</span> <span lang="en" dir="ltr" class="mw-content-ltr">This error message within a grey box:</span> :<span lang="en" dir="ltr" class="mw-content-ltr">Error creating thumbnail: Invalid thumbnail parameters</span> <span lang="en" dir="ltr" class="mw-content-ltr">One cause: the number of pixels in the original image exceeding {{wg|MaxImageArea}}.</span> <span lang="en" dir="ltr" class="mw-content-ltr">The default value 1.25e7 is too small for many modern cameras.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Too bad the diagnostic really doesn't hint at the problem.</span> <span lang="en" dir="ltr" class="mw-content-ltr">You can increase the value of {{wg|MaxImageArea}} or switch to using ImageMagick which evades this restriction (set {{wg|UseImageMagick}} and {{wg|ImageMagickConvertCommand}}).</span> <span lang="en" dir="ltr" class="mw-content-ltr">Large images can take significant processing time.</span> <span lang="en" dir="ltr" class="mw-content-ltr">It may be good policy to cap the size of images.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ====JPEG (using GD)==== </div> <span lang="en" dir="ltr" class="mw-content-ltr">Symptom:</span> <span lang="en" dir="ltr" class="mw-content-ltr">This error message within a grey box:</span> :Error creating thumbnail: Incomplete GD library configuration: missing function imagecreatefromjpeg <span lang="en" dir="ltr" class="mw-content-ltr">Some PHP 4.x and 5.x versions of PHP have a bug where libjpeg is detected but not enabled during the <code>./configure</code> step; this is fairly prevalent on Red Hat/RHEL/CentOS systems.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If you don't want to use ImageMagick, the fix for this is to recompile PHP.</span> <span lang="en" dir="ltr" class="mw-content-ltr">First, find out (from {{phpi|phpinfo()}}) what the existing <code>./configure</code> switches were, and add <code>'''--with-jpeg-dir'''</code> ''before'' <code>--with-gd</code>.</span> <syntaxhighlight lang="bash"> make clean ./configure --with-various-switches --with-jpeg-dir --with-gd --with-more-switches make make test # switch to root make install </syntaxhighlight> <span lang="en" dir="ltr" class="mw-content-ltr">Afterwards, restart the webserver (for Apache on Red Hat: <code>service apache stop</code> ''then'' <code>service apache start</code> ).</span> <span lang="en" dir="ltr" class="mw-content-ltr">To test, simply view the File:... page again (no need to upload again).</span> <span lang="en" dir="ltr" class="mw-content-ltr">For more information see the comments on [https://php.net/function.imagecreatefromjpeg PHP: imagecreatefromjpeg (function synopsis)]</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== Unable to save thumbnail to destination ==== </div> <span lang="en" dir="ltr" class="mw-content-ltr">If you get the error "Error generating thumbnail / Error creating thumbnail: Unable to save thumbnail to destination" and the {{wg|UploadDirectory}} directory has the correct permissions (at all levels), check that {{wg|TmpDirectory}} actually exists.</span> <span lang="en" dir="ltr" class="mw-content-ltr">(Unlike some path variables such as {{wg|CacheDirectory}}, $wgTmpDirectory is not created at runtime.)</span> <span lang="en" dir="ltr" class="mw-content-ltr">A more detailed error message may be available if you turn on logging with {{wg|DebugLogFile}}.</span> <span lang="en" dir="ltr" class="mw-content-ltr">This error can also occur when read only mode ({{wg|ReadOnly}}) has been set in <code>LocalSettings.php</code>.</span> <span lang="en" dir="ltr" class="mw-content-ltr">You can try to remove {{code|inline=yes|lang=php|$wgReadOnly}} to see if that solves the issue for you.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== Error creating thumbnail Error code: 25 ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> If you get "Error creating thumbnail Error code: 25" with ImageMagick, try increasing {{wg|MaxShellFileSize}}. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== Manually adding thumbnail files ==== </div> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <span lang="en" dir="ltr" class="mw-content-ltr">This involves creating the smaller images in the desired sizes and uploading them to the <code>thumb/</code> directory in {{wg|UploadDirectory}}.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> For example, a file that has uploaded to: </div> images/f/f8/Foo.png <span lang="en" dir="ltr" class="mw-content-ltr">should have its thumbnails at:</span> images/thumb/f/f8/Foo.png/100px-Foo.png images/thumb/f/f8/Foo.png/600px-Foo.png <span lang="en" dir="ltr" class="mw-content-ltr">The pixel size is the horizontal dimension.</span> <span lang="en" dir="ltr" class="mw-content-ltr">An example Bash script for creating thumbnails is available at [[Phabricator:P7049]].</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== Error creating thumbnail: Error code: -1 on OVH mutualized hosting ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> 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. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Solution is to specifically prevent from using ImageMagick by setting {{wg|UseImageMagick}} to false in LocalSettings.php: </div> <syntaxhighlight lang=php> $wgUseImageMagick = false; </syntaxhighlight> <div lang="en" dir="ltr" class="mw-content-ltr"> ===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.=== </div> {{main|Manual:How to debug/Login problems}} <div lang="en" dir="ltr" class="mw-content-ltr"> ===Content Limits=== </div> <span lang="en" dir="ltr" class="mw-content-ltr">If your Apache server has the [http://www.hardened-php.net/ 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.</span> <span lang="en" dir="ltr" class="mw-content-ltr">In particular, consider the settings for <code>varfilter.max_value_length</code>, <code>hphp.post.max_value_length</code>, <code>hphp.request.max_value_length</code>.</span> <span lang="en" dir="ltr" class="mw-content-ltr">The default settings may limit your pages to less than 10k or 64k in size.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Another possibility is if your Apache server is using [http://modsecurity.org/ mod_security] that could be interfering with MediaWiki.</span> <span lang="en" dir="ltr" class="mw-content-ltr">You will need to turn it off for MediaWiki to work properly.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ===You have not specified a valid user name / Completely blank page edits and previews / Unable to upload === </div> <div lang="en" dir="ltr" class="mw-content-ltr"> This is caused by something truncating or dropping POST data from the browser to the web server. </div> <span lang="en" dir="ltr" class="mw-content-ltr">In at least one instance, this was caused by <code>post_max_size</code> and <code>upload_max_filesize</code> in php.ini being set too high (2048M).</span> <span lang="en" dir="ltr" class="mw-content-ltr">Setting them back to more sane values (8M) fixed it.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Apparently, no POST data was actually making it through to MediaWiki.</span> <span lang="en" dir="ltr" class="mw-content-ltr">In another instance, mod_auth_sspi was interfering with http posts to MW.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Using FireFox and entering domain credentials would work fine, but MSIE would fail.</span> <span lang="en" dir="ltr" class="mw-content-ltr">This is a known defect in mod_auth_sspi 1.0.4.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> You have a few options to make this work: </div> *<span lang="en" dir="ltr" class="mw-content-ltr">Set SSPIOfferSSPI off ← users will get prompted and have to enter domain credentials, same as BASIC mode</span> *<span lang="en" dir="ltr" class="mw-content-ltr">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)</span> *<span lang="en" dir="ltr" class="mw-content-ltr">Downgrade to 1.0.3 but it's basically the same as #2 above.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> === The wiki appears without styles applied and images are missing === </div> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <span lang="en" dir="ltr" class="mw-content-ltr">The solution is to manually specify the {{wg|Server}} variable to the host name that everyone will use to access the wiki.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If your wiki is being accessed from an internal network and an external one, you may need to use the external address for {{phpi|$wgServer}}.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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: <syntaxhighlight lang=php inline>$wgServer = "http://example.domain.com:8080";</syntaxhighlight>)</span> <span lang="en" dir="ltr" class="mw-content-ltr">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 {{ll|ResourceLoader}} <code>load.php</code> script.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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 see a Blank Page]]).</span> <span lang="en" dir="ltr" class="mw-content-ltr">You should see a comment similar to <code>/* No modules requested. Max made me put this here */</code>.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If so, it may be a problem with the web server's <code>.htaccess</code> file.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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 [[Special:MyLanguage/Manual:Short URL|Short URLs]].</span> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <span lang="en" dir="ltr" class="mw-content-ltr">There seems to be a problem with some PHP versions and Gentoo that causes Apache to segfault.</span><ref> [https://bugs.gentoo.org/show_bug.cgi?id=471682 <span lang="en" dir="ltr" class="mw-content-ltr">Gentoo bug</span>] </ref> <span lang="en" dir="ltr" class="mw-content-ltr">This can also happen if you have APC enabled, setting <code>apc.serializer=php</code> in php.ini might help.</span><ref> [https://github.com/krakjoe/apcu/issues/38 <span lang="en" dir="ltr" class="mw-content-ltr">Array keys corruption with APC</span>] </ref> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <span lang="en" dir="ltr" class="mw-content-ltr">That may be caused by a low {{php-ini|pcre.backtrack_limit}} set up on some distributions like FreeBSD.</span> <span lang="en" dir="ltr" class="mw-content-ltr">It's known to have problems with values of 10000.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Increase that value to 100000, or the current default of 1000000.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Since MediaWiki 1.26, some skins, and specially Vector, may have this problem.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If you see the error <samp>Internal error Problematic modules: {"startup":"error"}</samp> 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 <code>/tmp</code> (<code>C:\WINDOWS\TEMP</code> on Windows), or because there's an {{php-ini|open_basedir}} restriction and that path isn't included on it.</span> <span lang="en" dir="ltr" class="mw-content-ltr">See {{phabricator|T119934}}.</span> <span lang="en" dir="ltr" class="mw-content-ltr">You can also set {{wg|TmpDirectory}} if you're unable to change permissions on the system's default temp directory.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> === Error: invalid magic word 'speciale' === </div> {{MW 1.20|and after}} <span lang="en" dir="ltr" class="mw-content-ltr">If you get that error message after upgrading, you must run the {{ll|Manual:rebuildLocalisationCache.php|rebuildLocalisationCache.php}} maintenance script with the <code>--force</code> option:</span> php rebuildLocalisationCache.php --force <div lang="en" dir="ltr" class="mw-content-ltr"> === Localised strings show their message ID instead of a localized result === </div> <span lang="en" dir="ltr" class="mw-content-ltr">If you're seeing this, try running the {{ll|Manual:rebuildLocalisationCache.php|rebuildLocalisationCache.php}} maintenance script with the <code>--force</code> option:</span> php rebuildLocalisationCache.php --force <span lang="en" dir="ltr" class="mw-content-ltr">This will force MediaWiki to rebuild the localisation cache.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> === Missing edit toolbar, JavaScript not working === </div> {{note|1=<span lang="en" dir="ltr" class="mw-content-ltr">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 [[Extension:WikiEditor|WikiEditor]] extension aka "the 2010 wikitext editor", for many years now. Be sure this extension has been installed.</span>}} <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Open the error console of your web browser (usually by hitting <kbd>F12</kbd>), reload the page and see if any error message appears there.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If it displays an error, usually, setting {{wg|ShowExceptionDetails}} would give you more information.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Sometimes the problem is that the system's temp directory is not writable.</span> <span lang="en" dir="ltr" class="mw-content-ltr">In that case, you can also set {{wg|TmpDirectory}} if you're unable to change permissions on the system's default temp directory.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If you get errors like <code>Uncaught SyntaxError: Unexpected token <</code> or <code>Error: SyntaxError: syntax error (...) Source Code: <script (...)</code>, the cause is usually a hosting provider that is automatically injecting HTML code for tracking or advertising inside the {{ll|Manual:load.php|load.php}} script, which is used by [[ResourceLoader]] to load the scripts and CSS used by MediaWiki.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Open a support ticket with your hosting provider asking them to disable that injection.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If that's not possible, you should migrate your site to another hosting provider.</span> <span lang="en" dir="ltr" class="mw-content-ltr">That usually happens on free hosting providers.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> === Every page displays a fatal error, Log shows "MagicWordArray::parseMatch: parameter not found" === </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Try rebuilding the Localisation Cache: </div> php maintenance/rebuildLocalisationCache.php <div lang="en" dir="ltr" class="mw-content-ltr"> ''From [[Thread:Project:Support desk/fatal error out of nowhere|this thread]].'' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> === All uploads fail with the message "The file you uploaded seems to be empty..." === </div> <span lang="en" dir="ltr" class="mw-content-ltr">It may be caused by wrong rewrite rules when configuring [[Special:MyLanguage/Manual:Short URL|Short URLs]].</span> <span lang="en" dir="ltr" class="mw-content-ltr">Try disabling them (and the related configuration variables of MediaWiki) to see if that solves the problem.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Another problem may be a limit imposed by the web server about how many data the server can receive on a single request.</span> <span lang="en" dir="ltr" class="mw-content-ltr">See [[Special:MyLanguage/Manual:Configuring file uploads#Set maximum size for file uploads|Manual:Configuring file uploads#Set maximum size for file uploads]] for some configuration variables.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Check also the {{php-ini|upload_tmp_dir}} configuration directive from php.ini, and be sure that the folder has proper write permissions for the user account running PHP.</span> <span lang="en" dir="ltr" class="mw-content-ltr">On Windows, this directive often points to <code>C:\Windows\TEMP</code>, which may not be accessible in some circumstances.</span> <span lang="en" dir="ltr" class="mw-content-ltr">In that case, you can set up a different temp folder like C:\TEMP\ with proper permissions.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> If all uploads fail with the message "{{int|emptyfile}}", and in the Apache error logs you have entries like this: </div> <pre> 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 </pre> <span lang="en" dir="ltr" class="mw-content-ltr">This is a problem with the PHP version your server is using.</span> <span lang="en" dir="ltr" class="mw-content-ltr">There have been several reports of this problem with PHP 5.3.8 on SLES11 sp2.</span> <span lang="en" dir="ltr" class="mw-content-ltr">You may need to upgrade PHP or recompile it yourself.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> === WAMP/Apache on Windows: Some Special: pages are inaccessible === </div> <div lang="en" dir="ltr" class="mw-content-ltr"> It may happen, on Windows installations under Apache, that some [[Special:MyLanguage/Help:Special pages|Special pages]] are inaccessible, giving a error, and in the logs you can see something like this: </div> [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 <span lang="en" dir="ltr" class="mw-content-ltr">This can be caused by various PHP bugs.</span> <span lang="en" dir="ltr" class="mw-content-ltr">One of them is when the wiki is installed in a NTFS junction.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If that's not the problem, upgrading PHP to a newer version can help ([[Thread:Project:Support desk/Some Special: pages won't display in version 1.22.2 Apache Win 7|see this forum thread]])</span> <div lang="en" dir="ltr" class="mw-content-ltr"> === Attempting to save an edit gives you a 403 Forbidden error, or you get redirected to the main page === </div> <span lang="en" dir="ltr" class="mw-content-ltr">This is a common issue for shared host which have <code>[[ModSecurity|mod_security]]</code> enabled.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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).</span> <span lang="en" dir="ltr" class="mw-content-ltr">If the edit is saved, but other edits aren't, that's caused by mod_security.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Ask your hosting customer support to disable it completely or the rules affecting your edits.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> 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 {{wg|Server}} or some other configuration variable that controls the path of the index.php script, or conflicts with rewrite rules in your webserver's configuration. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> === Login page warns about cookies disabled === </div> {{outdated}} You may get a message like <q>{{int|nocookieslogin}}</q>. <div lang="en" dir="ltr" class="mw-content-ltr"> If cookies aren't disabled on your browser, it could be one of those problems: </div> * <span lang="en" dir="ltr" class="mw-content-ltr">You have {{wg|SessionsInMemcached}} set to {{phpi|true}} but MediaWiki can't connect to Memcached.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Turn off this setting or check the Memcached configuration.</span> * <span lang="en" dir="ltr" class="mw-content-ltr">A wrong [[Special:MyLanguage/Manual:Configuration settings#Cookies|cookie configuration]].</span> <span lang="en" dir="ltr" class="mw-content-ltr">Configuration variables about cookies should work with their default values.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Try to not override any of them.</span> * <span lang="en" dir="ltr" class="mw-content-ltr">{{php|session_save_path}} is not set correctly on the server, or the server doesn't have permissions to write to that path.</span> * <span lang="en" dir="ltr" class="mw-content-ltr">If you use some sort of caching proxy in front of MediaWiki, check that it doesn't filter any cookie.</span> * <span lang="en" dir="ltr" class="mw-content-ltr">{{php|session.referer_check}} is wrongly set.</span> <span lang="en" dir="ltr" class="mw-content-ltr">You should normally leave it empty.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> Setting a [[Special:MyLanguage/Manual:How to debug|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. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> === MediaWiki does not function when magic quotes are enabled === </div> <div style="float:right"> {{MW 1.23|and before}}<br /> {{MW 1.24|and later}} </div> <span lang="en" dir="ltr" class="mw-content-ltr">[https://php.net/security.magicquotes.what Magic quotes] was a feature in PHP that was deprecated in PHP 5.3 and removed in PHP 5.4.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If you get this error, you need to disable the magic quotes in your server setting.</span> <span lang="en" dir="ltr" class="mw-content-ltr">See [https://php.net/security.magicquotes.disabling how to do it].</span> <span lang="en" dir="ltr" class="mw-content-ltr">Discussions:</span> [[Thread:Project:Support_desk/Problems_with_installing_mediawiki]], [[Topic:S79xdn9u15xw55vj]], [[Topic:Sdpbmy9q9e0ttp6k]], [[Topic:S7g4rybniat2i36e]], [[Topic:S6vqwk0tysl6m8lc]] <div lang="en" dir="ltr" class="mw-content-ltr"> === Error creating thumbnail: File with dimensions greater than 12.5 MP === </div> <div lang="en" dir="ltr" class="mw-content-ltr"> It may help to increase {{wg|MaxImageArea}} to get rid of the problem (tried with MediaWiki 1.26.2). </div> <div lang="en" dir="ltr" class="mw-content-ltr"> === Internal Server Error when opening any image === </div> <span lang="en" dir="ltr" class="mw-content-ltr">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 <code>.htaccess</code> file from the <code>images</code> directory.</span> <span lang="en" dir="ltr" class="mw-content-ltr">This configuration file contains some rewrite rules to prevent old Internet Explorer versions from being affected by a cross site scripting vulnerability.</span> <span lang="en" dir="ltr" class="mw-content-ltr">However, some hosts like strato.de prevents disallow the <code>RewriteOptions</code> directive in .htaccess, causing any request for a file in the images folder to fail with an error.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <span lang="en" dir="ltr" class="mw-content-ltr">See [[Topic:Uye1450mvn00f4y1|this thread]].</span> <div lang="en" dir="ltr" class="mw-content-ltr"> === Category pages, Special:Whatlinkshere and file usage aren't being updated === </div> <span lang="en" dir="ltr" class="mw-content-ltr">Information about pages contained in a category, links to other wiki pages and images embedded in pages are tracked in special tables.</span> <span lang="en" dir="ltr" class="mw-content-ltr">The update of such tables is not done immediately after the edit is saved, but deferred to the [[Manual:Job queue|job queue]] for performance reasons.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If it takes too long to update, you may need to adjust {{wg|JobRunRate}}, or try setting {{wg|RunJobsAsync}} to {{phpi|false}} in LocalSettings.php.</span> <span lang="en" dir="ltr" class="mw-content-ltr">This can happen in some installations, especially since MediaWiki 1.27 (see {{phabricator|T142751}}).</span> <div lang="en" dir="ltr" class="mw-content-ltr"> === Error: Could not open lock file for "mwstore://local-backend/local-public/./../image.png === </div> <span lang="en" dir="ltr" class="mw-content-ltr">Check that the "images" directory has permissions which allow writing.</span> <span lang="en" dir="ltr" class="mw-content-ltr">For example: <code>chown -R www-data:www-data images</code> and <code>chmod -R 777 images</code>.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If you have [[SELinux]] enabled, this could also be problematic.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> === Notice: Did not find alias for special page 'Foo'. Perhaps no aliases are defined for it? [Called from SpecialPageFactory::getLocalNameFor in ...=== </div> <span lang="en" dir="ltr" class="mw-content-ltr">You need to create an alias file.</span> <span lang="en" dir="ltr" class="mw-content-ltr">So, put something like this in your extension file (e.g. /extensions/Foo/Foo.php):</span> <syntaxhighlight lang="php"> $wgExtensionMessagesFiles['FooAlias'] = __DIR__ . '/Foo.alias.php'; </syntaxhighlight> <div lang="en" dir="ltr" class="mw-content-ltr"> Then create an alias file like this: </div> <syntaxhighlight lang="php"> <?php /** * Aliases for Special:Foo * * @file * @ingroup Extensions */ // @codingStandardsIgnoreFile $specialPageAliases = array(); /** English (English) */ $specialPageAliases['en'] = array( 'Foo' => array( 'Foo' ), ); </syntaxhighlight> <span lang="en" dir="ltr" class="mw-content-ltr">Make sure you don't have a {{phpi|$wgMessagesDirs}} item with the same key.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Keys of {{phpi|$wgExtensionMessagesFiles}} which are also in {{phpi|$wgMessagesDirs}} will be skipped.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ===Warning: Invalid argument supplied for foreach() in ./includes/objectcache/SqlBagOStuff.php === </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Probably you just moved your wiki, and didn't import your database, so it's empty. </div> === Warning: Invalid argument supplied for foreach() in ./includes/cache/localisation/LocalisationCache.php on line 459 === To fix the warning uncomment in LocalSettings.php line <nowiki>#$wgCacheDirectory = "$IP/cache";</nowiki> <div lang="en" dir="ltr" class="mw-content-ltr"> === 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. === </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Please follow {{ll|Manual:How to debug/Login problems}}. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===Call to undefined method=== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> 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. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===Unable to run external programs, proc_open() is disabled=== </div> <span lang="en" dir="ltr" class="mw-content-ltr">The function has been disabled in [https://www.php.net/ini.core <code>php.ini</code>].</span> <span lang="en" dir="ltr" class="mw-content-ltr">This prevents using [[Manual:Image administration#Image thumbnailing|ImageMagick]] to resize images to create thumbnails.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Either contact your hosting provider, or try to use <code>gd</code> instead of <code>ImageMagick</code> by setting {{wg|UseImageMagick}} to {{phpi|false}}.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> === CAS update failed on <code>user_touched</code> for user ID '*' (read from slave); the version of the user to be saved is older than the current version === </div> <span lang="en" dir="ltr" class="mw-content-ltr">There are several reasons for this error.</span> <span lang="en" dir="ltr" class="mw-content-ltr">One simple one is if the content of {{db table|user|user_touched}} is empty or is set to a time in the future.</span> <span lang="en" dir="ltr" class="mw-content-ltr">You might want to check if the server's time is set correctly and synchronized.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Also check the contents of that column and fill the column with valid content e.g. with this SQL statement:</span> {{#tag:syntaxhighlight|UPDATE `user` SET user_touched='{{CURRENTTIMESTAMP}}' WHERE HEX( user_touched )='0000000000000000000000000000'; -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- 28 zeroes|lang=sql}} <!-- This formatting makes sure that the code remains readable on small screens --> <span lang="en" dir="ltr" class="mw-content-ltr">Where the date is in YYYYMMDDHHMMSS format for the current date/time.</span> <span lang="en" dir="ltr" class="mw-content-ltr">See [[phab:T247751]].</span> <div lang="en" dir="ltr" class="mw-content-ltr"> === Lua error: Internal error === </div> {{main|Extension:Scribunto#Troubleshooting}} <div lang="en" dir="ltr" class="mw-content-ltr"> === A database query error has occurred. This may indicate a bug in the software. === </div> <span lang="en" dir="ltr" class="mw-content-ltr">If you recently upgraded MediaWiki, or recently installed or upgraded extensions, try running the {{ll|Manual:Update.php|update.php}} maintenance script.</span> <span lang="en" dir="ltr" class="mw-content-ltr">(See also {{ll|Manual:Upgrading}}.)</span> <span lang="en" dir="ltr" class="mw-content-ltr">If that doesn't help, then you really may have ran into a bug in the software.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Try to obtain more details about the query that fails ({{ll|Manual:How to debug}}) and {{ll|How to report a bug|file a bug}}.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> === $wgSecretKey key is insecure, generated with mt_rand() === </div> <span lang="en" dir="ltr" class="mw-content-ltr">Your system does not support <code>/dev/urandom</code> so the key was generated with <code>mt_rand()</code>.</span> <span lang="en" dir="ltr" class="mw-content-ltr">See {{wg|SecretKey}}.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ===MediaWiki requires PHP 7.4.3 or higher; you are using PHP 7.3.17=== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> If the PHP version on your web server should be recent enough, check if you have several PHP versions installed in parallel. </div> <span lang="en" dir="ltr" class="mw-content-ltr">Create a file called <code>info.php</code> with the single-line content {{phpi|<?php phpinfo();}} and place this file in the web directory.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Access it with your web browser.</span> <span lang="en" dir="ltr" class="mw-content-ltr">It will display the PHP version that is used by your web server.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ==PHP Errors== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes)=== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Raise PHP's memory limit in php.ini: </div> <syntaxhighlight lang="ini"> memory_limit = 64M ; Maximum amount of memory a script may consume (32MB) </syntaxhighlight> {{MW 1.16|and later}}{{clear}} <div lang="en" dir="ltr" class="mw-content-ltr"> You can add a higher value for {{wg|MemoryLimit}} in LocalSettings.php. </div> {{MW 1.15|and before}}{{clear}} {{note|1=<span lang="en" dir="ltr" class="mw-content-ltr">In versions 1.15 and earlier, the memory limit in php.ini may be overridden '''by default''' in LocalSettings.php with the line:</span><br /><syntaxhighlight lang="php">ini_set('memory_limit', '20M');</syntaxhighlight> <span lang="en" dir="ltr" class="mw-content-ltr">You may increase the memory limit here, or comment this line out in LocalSettings.php to use the limit specified in php.ini.</span>}} {{note|1=<span lang="en" dir="ltr" class="mw-content-ltr">This error can often happen for other reasons.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Look for Unicode usage on systems that do not support it properly.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span>}} <div lang="en" dir="ltr" class="mw-content-ltr"> Read [https://php.net/ini.core#ini.sect.resource-limits php.net's information on configuring resource limits in PHP]. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===Fatal error: Class 'DOMDocument' not found in xxxxxxxx/Preprocessor_DOM.php on line nnn=== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> This error happens when PHP hasn't been compiled with DOM support, or the DOM/xml extension is missing. </div> * <span lang="en" dir="ltr" class="mw-content-ltr">Install the right <code>php-xml</code> package for your distro. Example: <code>sudo yum install php-xml</code></span> * <span lang="en" dir="ltr" class="mw-content-ltr">Alternatively, change the MediaWiki 'preprocessor' class in LocalSettings.php (see {{wg|ParserConf}})</span> <syntaxhighlight lang="php"> $wgParserConf['preprocessorClass'] = 'Preprocessor_Hash'; </syntaxhighlight> <div lang="en" dir="ltr" class="mw-content-ltr"> ===Fatal error: Invalid opcode 153/1/8. in xxx/includes/cache/MessageCache.php on line nnn=== </div> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Try upgrading the accelerator.</span> [[Thread:Project:Support_desk/_Fatal_exception_of_type_MWException|report]] <div lang="en" dir="ltr" class="mw-content-ltr"> ===Warning: Cannot modify header information - headers already sent by (...)=== </div> <span lang="en" dir="ltr" class="mw-content-ltr">Most likely, your text editor added a [[:w:byte order mark|byte order mark]] (BOM) while you edited MediaWiki's PHP files, but any other content before the opening {{phpi|<?php}} causes the same problem.</span> <span lang="en" dir="ltr" class="mw-content-ltr">This usually happens with {{ll|Manual:LocalSettings.php|LocalSettings.php}} - but see error message for exact file.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Note that BOMs are invisible in most text editors.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> === Strict Standards: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. === </div> <span lang="en" dir="ltr" class="mw-content-ltr">If you get Strict Standards: errors in the HTML output, that's because your <code>error_reporting</code> configuration variable of PHP is set to <code>E_ALL</code>, but since PHP 5.4.0, E_STRICT became part of E_ALL.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Just add your time zone to LocalSetting.php, e.g.</span> <syntaxhighlight lang="php"> $wgLocaltimezone = 'Europe/Berlin'; </syntaxhighlight> <span lang="en" dir="ltr" class="mw-content-ltr">The following does not work in all cases.</span> <span lang="en" dir="ltr" class="mw-content-ltr">It may be better to put this in the php.ini which must be present in all affected directories.</span> <span lang="en" dir="ltr" class="mw-content-ltr">You may turn of E_STRICT errors putting the following line of code inside your {{ll|Manual:LocalSettings.php|LocalSettings.php}}, or in case a line with the <code>error_reporting</code> function exists, replace it with:</span> <syntaxhighlight lang="php"> error_reporting( E_ALL & ~( E_STRICT | E_NOTICE ) ); </syntaxhighlight> <div lang="en" dir="ltr" class="mw-content-ltr"> You can turn off PHP error reporting entirely using this instead: </div> <syntaxhighlight lang="php"> error_reporting( 0 ); </syntaxhighlight> <span lang="en" dir="ltr" class="mw-content-ltr">See also: [https://php.net/function.error-reporting Setting error reporting in PHP].</span> <span lang="en" dir="ltr" class="mw-content-ltr">If nothing works, please check at the start of your LocalSettings.php file:</span> <span lang="en" dir="ltr" class="mw-content-ltr">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 ([[Thread:Project:Support desk/Installation,/reply (9)|example]]).</span> <span lang="en" dir="ltr" class="mw-content-ltr">If that was what happened, edit the file removing everything before "{{code|inline=yes|lang=php|<?php}}" and verify there's nothing (even whitespace) before "{{code|inline=yes|lang=php|<?php}}".</span> <div lang="en" dir="ltr" class="mw-content-ltr"> === Fatal Error: Cannot redeclare wfprofilein() === </div> <span lang="en" dir="ltr" class="mw-content-ltr">This could happen if you upgraded and you have a <code>StartProfiler.php</code> file in the root MediaWiki installation directory, probably because you enabled profiling in an old installation.</span> <span lang="en" dir="ltr" class="mw-content-ltr">To solve the issue simply remove that file.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> === Warning: Inaccessible files === </div> <span lang="en" dir="ltr" class="mw-content-ltr">After your move, you might see PHP warnings that certain files could not be accessed.</span> <span lang="en" dir="ltr" class="mw-content-ltr">This is most likely caused by {{phabricator|T37472}}:</span> <span lang="en" dir="ltr" class="mw-content-ltr">The column <code>md_deps</code> in the {{ll|Manual:Module_deps_table|module_deps}} table contains absolute file paths, which are used to locate the images and LESS files that CSS depends on.</span> <span lang="en" dir="ltr" class="mw-content-ltr">These paths break when the wiki is, e.g., moved to another folder or another server.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Until this bug is solved, you can use this workaround to manually fix wrong entries in the <code>module_deps</code> table:</span> <syntaxhighlight lang="sql"> -- Update entries in <code>module_deps</code> table SET @old='wiki.old-domain.org'; SET @new='wiki.new-domain.org'; UPDATE `module_deps` SET `md_deps` = REPLACE( `md_deps`, @old, @new ); </syntaxhighlight> <div lang="en" dir="ltr" class="mw-content-ltr"> This can be used to update wrong path segments and to fix the error. </div> {{MW version|version=1.17|version2=1.26}} <span lang="en" dir="ltr" class="mw-content-ltr">A similar issue can happen when MediaWiki tries to read ResourceLoader messages.</span> <span lang="en" dir="ltr" class="mw-content-ltr">In this case the solution is to truncate the according tables:</span> <syntaxhighlight lang="sql"> -- Truncate message related caches TRUNCATE TABLE `msg_resource`; TRUNCATE TABLE `msg_resource_links`; </syntaxhighlight> <div lang="en" dir="ltr" class="mw-content-ltr"> === Fatal error: Uncaught Exception: extension.json does not exist === </div> {{MW 1.25|and later}} {{See also|Manual:Extension registration}} <div lang="en" dir="ltr" class="mw-content-ltr"> If this error happens when you try to install an extension, it usually means that the extension still requires to use the native PHP <code>require_once</code> language construct instead of the newer <code>wfLoadExtension()</code> method. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> == Installation Errors == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===LocalSettings.php not readable=== </div> * <span lang="en" dir="ltr" class="mw-content-ltr">On a Linux machine, use <code>chown</code> or <code>chgrp</code> to correct the file permissions of <code>LocalSettings.php</code>.</span> * <span lang="en" dir="ltr" class="mw-content-ltr">On some Linux machines, temporarily disable [[w:Security-Enhanced Linux|SELinux]] by running the command <code>sudo setenforce 0</code>.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ===The installer is unstyled when installing under IIS=== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> The installer is unstyled and instead of the stylesheet, <code>/mw-config/index.php?css=1</code> 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" </div> <span lang="en" dir="ltr" class="mw-content-ltr">Make sure that the webserver user, who by default is named <code>IUSR</code>, is allowed to access the C:\Windows\TEMP directory.</span> <span lang="en" dir="ltr" class="mw-content-ltr">At least read and write permissions are necessary.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ===Error selecting database wikidb: 1044 Access denied for user 'username'@'localhost' to database 'wikidb'=== </div> {{See also|Manual:Installation guide#MySQL}} <span lang="en" dir="ltr" class="mw-content-ltr">You need to Grant permissions on wikidb.*.</span> <syntaxhighlight lang="sql"> GRANT ALL ON wikidb.* TO 'username'@'localhost' IDENTIFIED BY 'password'; </syntaxhighlight> <span lang="en" dir="ltr" class="mw-content-ltr">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</span> <syntaxhighlight lang="sql"> GRANT ALL ON wikidb.* TO 'username'@'192.168.0.x' IDENTIFIED BY 'password'; </syntaxhighlight> <span lang="en" dir="ltr" class="mw-content-ltr">NOTE: Replace 192.168.0.x with your Webserver's IP.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Also note that the apostrophes (') need to stay.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ===Database returned error "1142: CREATE command denied to user 'username'@'localhost' for table 'user_properties' (localhost)"=== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> As above, or temporarily use the mysql root user. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===Could not find a suitable database driver!=== </div> <span lang="en" dir="ltr" class="mw-content-ltr">PHP MySQL support is not installed/enabled - See https://php.net/book.mysqli.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Depending on your operating system, you may need to install an additional package.</span> <span lang="en" dir="ltr" class="mw-content-ltr">For example, on debian/ubuntu run <code>sudo apt install php-mysql</code>.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ===Filename Case Errors=== </div> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <span lang="en" dir="ltr" class="mw-content-ltr">MediaWiki filenames are case-sensitive.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ===Incomplete Upload Errors=== </div> <span lang="en" dir="ltr" class="mw-content-ltr">The MediaWiki package includes a lot of files, spread over dozens of directories.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Be careful when uploading.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If the transfer is interrupted, you might have missing or incomplete files.</span> <span lang="en" dir="ltr" class="mw-content-ltr">You may have to retry your upload several times, especially if you have an unreliable connection.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ===403 Forbidden with Symbolic Links=== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> If your webserver produces a "403 Forbidden error" page and you are using symbolic links, then make sure your Apache <code>httpd.conf</code> file has <code>Options FollowSymLinks</code> to allow symbolic links and that each directory leading up to your linked directory has <code>+x</code> permission for user running httpd. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===HTTP 500 Internal Error during installation === </div> <span lang="en" dir="ltr" class="mw-content-ltr">If your webserver produces a "500 Internal Error" at the beginning of the install process, you may need to change the permissions on the <code>mw-config</code> directory to 755.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If you have changed the permissions for the config directory and still get an unwritable error try changing the owner to Apache.</span> <syntaxhighlight lang="bash"> chown -R apache:apache /var/www/html/mediawiki/* </syntaxhighlight> <div lang="en" dir="ltr" class="mw-content-ltr"> ===HTTP 500 Internal Error after installation === </div> <div lang="en" dir="ltr" class="mw-content-ltr"> If you downloaded the MediaWiki code [[Special:MyLanguage/Download from Git|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: </div> <syntaxhighlight lang="bash"> find . -type f -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \; </syntaxhighlight> <div lang="en" dir="ltr" class="mw-content-ltr"> ===SELinux=== </div> {{main|SELinux}} <span lang="en" dir="ltr" class="mw-content-ltr">Linux distributions which support SELinux ('Security Extensions') are becoming more widespread.</span> <span lang="en" dir="ltr" class="mw-content-ltr">On such systems, PHP scripts will still be unable to write to the config directory, after you have set the normal file permissions.</span> <span lang="en" dir="ltr" class="mw-content-ltr">You will also need to use the 'chcon' command to change the SELinux file type.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ===Required Advertisements on Hosted Sites=== </div> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <span lang="en" dir="ltr" class="mw-content-ltr">You will have to contact your host to make them make their advertising compatible with MediaWiki, or choose a different host.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ===Debian, Apache2, and PHP=== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> 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-mysqli option?)'' try uncommenting: {{code|inline=yes|lang=ini|extension{{=}}mysqli.so}} in the /etc/php5/apache2/php.ini file. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> If that does not work, try the following... </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Check that MySQL module for php is installed: </div> <syntaxhighlight lang="bash"> dpkg --list | grep php-mysql </syntaxhighlight> <span lang="en" dir="ltr" class="mw-content-ltr">If you need to install the php5-mysql module enter:</span> <syntaxhighlight lang="bash"> apt-get install php-mysql </syntaxhighlight> <div lang="en" dir="ltr" class="mw-content-ltr"> Then restart Apache2: </div> <syntaxhighlight lang="bash"> /etc/init.d/apache2 restart </syntaxhighlight> <div lang="en" dir="ltr" class="mw-content-ltr"> ==='user_password' can't have a default value=== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Ensure that MySQL is not running in strict mode. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===Missing table prefix=== </div> <span lang="en" dir="ltr" class="mw-content-ltr">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).</span> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ===MySQL connection fails with error [2013] or [2002]=== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> If you are getting the error: <samp>failed with error [2013] Lost connection to MySQL server during query.</samp> or <samp>failed with error [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13).</samp>, this may be caused by using the wrong database host name or by a permissions issue with the mysql.soc file or directory. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> If you are using a hosting provider, ensure that you are using the correct host name for the database. </div> <span lang="en" dir="ltr" class="mw-content-ltr">The MySQL manual has [http://dev.mysql.com/doc/refman/5.0/en/common-errors.html a good set of pages] on dealing with common errors (such as these).</span> <span lang="en" dir="ltr" class="mw-content-ltr">Visit the page for links to documentation for other versions of MySQL.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> If you are unsure if MySQL is even installed, try the command <code>mysql</code> from the command line; if it is not installed, see [[Special:MyLanguage/Manual:Running MediaWiki#System-specific instructions|Manual:Running MediaWiki#System-specific instructions]]. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===UNIX utility binaries not found=== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Errors include: </div> * <span lang="en" dir="ltr" class="mw-content-ltr">GNU diff3 not found</span> * <span lang="en" dir="ltr" class="mw-content-ltr">Git version control software not found</span> * <span lang="en" dir="ltr" class="mw-content-ltr">ImageMagick not found</span> <span lang="en" dir="ltr" class="mw-content-ltr">PHP must have access to /usr/bin.</span> <span lang="en" dir="ltr" class="mw-content-ltr">In php.ini (probably <code>/etc/php/php.ini</code>), add <code>:/usr/bin/</code> to open_basedir config variable as below:</span> <syntaxhighlight lang="ini"> open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/var/www/:/usr/bin/ </syntaxhighlight> <span lang="en" dir="ltr" class="mw-content-ltr">To disable GIT set {{wg|GitBin}} to a path that's allowed but doesn't exist.</span> <syntaxhighlight lang="php"> $wgGitBin = ""; </syntaxhighlight> <div lang="en" dir="ltr" class="mw-content-ltr"> === "Forbidden: You don't have permission to access /mediawiki/ on this server." === </div> <span lang="en" dir="ltr" class="mw-content-ltr">This is usually an issue with the configuration of your web server software and unrelated to MediaWiki itself.</span> <span lang="en" dir="ltr" class="mw-content-ltr">See for example [https://stackoverflow.com/questions/10873295/error-message-forbidden-you-dont-have-permission-to-access-on-this-server this Stackoverflow thread] or other web server forums.</span> <div lang="en" dir="ltr" class="mw-content-ltr"> === Too many redirects (ERR_TOO_MANY_REDIRECTS) === </div> <div lang="en" dir="ltr" class="mw-content-ltr"> When this happens on every page, this is usually caused by a wrong {{ll|Manual:Short URL}} configuration, usually because of an error in a redirect rule. </div> <span lang="en" dir="ltr" class="mw-content-ltr">This can also happen when {{wg|ForceHTTPS}} is set to {{phpi|true}}, and somehow MediaWiki isn't properly detecting the protocol used by the client, and keeps sending a redirect to https:.</span> <span lang="en" dir="ltr" class="mw-content-ltr">This may happen when MediaWiki is set behind a reverse proxy that isn't setting the <code>X-Forwarded-Proto</code> HTTP header to <code>https</code>.</span> {{anchor|Update_Errors}} <div lang="en" dir="ltr" class="mw-content-ltr"> == Update/Upgrade errors == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> === Missing <code>rc_timestamp</code> field of <code>recentchanges</code> table. Should not happen. === </div> <span lang="en" dir="ltr" class="mw-content-ltr">Might e.g. happen on upgrading from MW 1.27 to another version.</span> <span lang="en" dir="ltr" class="mw-content-ltr">If there is no database content at all you might see this message.</span> <span lang="en" dir="ltr" class="mw-content-ltr">See [[phab:T236671]].</span> <span lang="en" dir="ltr" class="mw-content-ltr">This may happen if you didn't specify the same {{wg|DBprefix}} as your original installation, causing MediaWiki to not find its tables.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Check the existing tables on the database and see if they all share a common prefix, and update that setting accordingly.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Another cause may be that you set an empty database.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Reinstall the database content from a backup and proceed with migrating.</span> === "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 [[Manual:Installing MediaWiki|installing the wiki]]. <div lang="en" dir="ltr" class="mw-content-ltr"> == Parsoid / VisualEditor == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> See {{ll|Parsoid/Troubleshooting}} and {{ll|Extension:VisualEditor#Troubleshooting|Extension:VisualEditor#Troubleshooting}}. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==References== </div> <references/> <div lang="en" dir="ltr" class="mw-content-ltr"> ==See also== </div> * [[Manual:Config script#Installation errors]] * [[Manual:How to debug]] [[Category:Installation{{#translation:}}|{{PAGENAME}}]]
Toggle limited content width