Manual:Errores y síntomas comunes
Ves una página en blanco
Una página en blanco indica un error de PHP que no se muestra en la pantalla.
Para forzar esto, añada las siguientes líneas al archivo LocalSettings.php
, debajo de
:
<?php
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
También puede establecer un valor para error_log
en PHP.ini
y leer el registro de errores de PHP para averiguar qué está pasando.
En algunos casos, los errores de PHP también podrían constar en el registro de errores del servidor web.
Los informes de errores pueden incluir:
- "Advertencia [...] No es seguro confiar en la configuración de la zona horaria del sistema. Está *obligado* a usar la configuración date.timezone o la función date_default_timezone_set()." Compruebe si
date.timezone =
está establecido correctamente (o si está configurado) enphp.ini
. - Ciertos archivos pueden ser reportados como faltantes (por ejemplo, cuando la carpeta
media
en su carpeta/includes
ya no está presente, puede recibir el mensaje de que un proceso de imagen requerido "falló al abrir el flujo"). Verifique el paquete de instalación original en MediaWiki (asegúrese de consultar la versión apropiada) para ver si éste es el caso. Si es así, simplemente copie los archivos que faltan de dicho paquete dentro de su directorio de MediaWiki. Puede ser necesario actualizar la caché y reiniciar el servidor web después de esto. - No se puede encontrar el socket de MySQL. Si
LocalSettings.php
está establecido con el socket de MySQL correcto perophp.ini
no lo está, puede resultar en una pantalla en blanco sin ningún mensaje de error del servidor web o PHP. La solución es actualizar la entradamysql.default_socket
en el archivophp.ini
.
Muchas personas informan que aparecen páginas en blanco en versiones recientes después de enviar artículos a su nueva wiki.
Una causa probable es el límite de memoria en las instalaciones de php predeterminadas (normalmente 8 MB).
Por favor, revise sus registros de errores de PHP y/o Apache.
Para modificar esta configuración edite /etc/php.ini
y aumente el valor de "memory_limit".
Por ejemplo, para aumentarlo a 32 MB sustituya el texto existente por memory_limit = 32M
.
Asegúrese de reiniciar su servidor web después de haber cambiado este valor.
El límite de memoria puede que también haya sido establecido en su archivo LocalSettings.php
.
Busque la línea que contiene la configuración de memory_limit y auméntela según sea necesario.
Quizá 20M no sean suficientes si está ejecutando la versión 1.15.1.
Cámbielo a, por ejemplo, "memory_limit = 32M
".
Este cambio no requiere que reinicie Apache.
Si la página sólo se cuelga durante la carga por algún tiempo (como 30 segundos) haciendo una acción específica, y luego deriva en una página en blanco o un error HTTP 500, el problema es que se ha agotado el tiempo de espera para conectarse a algún servidor.
Esto podría ser el servidor de base de datos o, si sucede al realizar una acción específica, el servidor de correo (si ha configurado los ajustes de correo electrónico).
Si es el servidor de correo electrónico, compruebe si puede conectarse a él desde el servidor que ejecuta MediaWiki, por ejemplo, ejecutando el cliente Telnet con el servidor y puerto configurados en $wgSMTP
y viendo si puede conectarse.
Si puede ver brevemente el contenido de la página y, de repente, toda la página se queda en blanco, lo más probable es que el problema sea causado por la presencia de una instrucción de JavaScript document.write
, document.writeln
, o document.open
en uno de los scripts de la wiki.
Puede comprobar si ese es el caso si abre la consola de su navegador (pulse F12) y vuelva a cargar la página.
Si la pestaña de red devuelve un estado HTTP 200, y la transferencia es de varios kilobytes, es muy probable que este sea el problema.
Estos son métodos heredados de la interfaz Document
que provocan que toda la página se quede en blanco si se utilizan fuera de la página HTML, y pueden estar presentes en las páginas de JavaScript de la wiki.
Su uso está totalmente desaconsejado, como lo indica la propia especificación de HTML.
Puede desactivar JavaScript en su navegador o configurar $wgUseSiteJs
y $wgAllowUserJs
como false
para desactivar esos scripts hasta que arregle los que no funcionan.
Errores de MediaWiki
Todas las páginas no tienen contenido, pero al editar una página el texto wiki está ahí
Opcionalmente con esos mensajes de error:
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
Esto se debe a un cambio en PCRE 8.34, que ya no permite que los nombres de los grupos de captura comiencen con un dígito. Debe actualizar MediaWiki a una versión compatible. Véase Updating to PCRE 8.33 or Higher . El problema está solucionado en todas las versiones compatibles actualmente de MediaWiki (véase task T60640). PCRE 8.33 y 8.34 se publicaron en el año 2013.
Consulte el informe: Topic:Rz2zo0m88rrxqrfn, Thread:Project:Support desk/MediaWiki don't work with PCRE 8.34 (2)
Miniaturas de imagen que no funcionan o no aparecen
En esta sección se enumeran los problemas y soluciones relacionados con las miniaturas que no se procesan o no se muestran.
Error al crear la miniatura: Archivo faltante:
Esto podría ocurrir debido a valores incorrectos de las variables globales como se explica en:
Error con el punto decimal en la configuración regional de srcset
Si las miniaturas de las imágenes simplemente no aparecen, y no hay ningún error visible en esas páginas, mire el código fuente HTML de la página y busque "srcset
".
Si encuentra algo como <img ... srcset="/images/thumb/File.png/600px-File.png 1,5x, /images/thumb/File.png/800px-File.png 2x">
, donde aparece 1,5x
en lugar de 1.5x
, el problema es causado por task T181987, y debería añadir esto a LocalSettings.php:
setlocale(LC_NUMERIC, "C");
Cerciórese de que $wgShellLocale
no esté definido en su LocalSettings.php, o añada también esto:
$wgShellLocale = "C.UTF-8";
SVG
Primero, determine la configuración de su $wgSVGConverter
.
Por defecto, está configurado para usar ImageMagick para la conversión.
Usando ImageMagick
Necesita al menos ImageMagick 6.x.x.
Asegúrese de que su variable $wgImageMagickConvertCommand
es válida.
Las configuraciones comunes son:
$wgImageMagickConvertCommand = "/usr/bin/convert";
$wgImageMagickConvertCommand = "/usr/local/bin/convert";
Si no funciona, intente configurar $wgSVGConverterPath
.
$wgSVGConverterPath = "/usr/bin";
$wgSVGConverterPath = "/usr/local/bin";
Los alojamientos compartidos pueden proporcionar diferentes versiones de ImageMagick para satisfacer las necesidades de diferentes usuarios. Por favor, use la versión 6.x.x.
- Para determinar la versión de ImageMagick, busque en los archivos de ayuda de su proveedor de alojamiento, o utilice
/usr/bin/convert --version
o/usr/local/bin/convert --version
para detectarlo. - En los alojamientos Linux compartidos de GoDaddy, "/usr/bin/convert" para la versión 5.5.6 y "/usr/local/bin/convert" para la versión 6.2.8.
Si la generación de miniaturas con ImageMagick falla con un mensaje de registro de errores del servidor web similar a "Asignación de memoria fallida" o "/bin/ulimit4.sh: Fallo de segmentación /usr/bin/convert ...", el valor de $wgMaxShellMemory
puede que necesite ser incrementado.
Cuando en la ruta faltan caracteres no ASCII
- Compruebe si las configuraciones regionales UTF-8 están disponibles en su servidor ejecutando
locale -a
- Cuando no esté disponible ejecute
locale-gen en_US.utf8
o coloque la configuración regional con UTF-8 para su país y cambie el valor de$wgShellLocale
de acuerdo a esto.
Cuando se utiliza IIS/FastCGI en Windows, la cuenta de invitado que es usada también necesita permisos de ejecución en "C:\Windows\System32\cmd.exe" de lo contrario recibirá un error "Imposible de bifurcar".
Usando Batik
MediaWiki establece límites de tiempo y memoria para los comandos del shell (intérprete de comandos) bajo Linux.
Si recibe el error "Error ocurrido durante la inicialización de la VM, no se pudo reservar suficiente espacio para el montículo de objetos, no se pudo crear la máquina virtual de Java.", intente aumentar el valor de $wgMaxShellMemory
.
Usando rsvg
En algunas instalaciones de Linux y BSD, rsvg se renombra:
En lugar de establecer (por defecto)
$wgSVGConverters = array( 'rsvg' => '$path/rsvg -w$width -h$height $input $output' );
le gustaría establecer
$wgSVGConverters = array( 'rsvg' => '$path/rsvg-convert -w $width -h $height -o $output $input' );
JPEG
Síntoma: Este mensaje de error dentro de un recuadro gris:
- Erro en la creación de miniatura: Parámetros de miniatura inválidos
Una causa: la cantidad de píxeles en la imagen original excede el valor de $wgMaxImageArea
.
El valor predeterminado 1.25e7 es demasiado pequeño para muchas cámaras modernas.
Lástima que el diagnóstico no insinúe realmente cuál es el problema.
Puede incrementar el valor de $wgMaxImageArea
o bien cambiarse y utilizar ImageMagick, que elude esta restricción (configure $wgMaxImageArea
y $wgUseImageMagick
).
Las imágenes de gran tamaño pueden requerir un tiempo de procesamiento considerable. Puede ser una buena política limitar el tamaño de las imágenes.
JPEG (usando GD)
Síntoma: Este mensaje de error dentro de un recuadro gris:
- Error creating thumbnail: Incomplete GD library configuration: missing function imagecreatefromjpeg
Algunas versiones de PHP 4.x y 5.x, tienen un error en el que libjpeg es detectada pero no habilitada durante el paso ./configure
; esto es bastante frecuente en sistemas Red Hat/RHEL/CentOS.
Si no quiere usar ImageMagick, la solución para esto es recompilar PHP.
Primero, averigüe (desde phpinfo()
) cuales eran los parámetros existentes en ./configure
, y agregue --with-jpeg-dir
antes de --with-gd
.
make clean
./configure --with-various-switches --with-jpeg-dir --with-gd --with-more-switches
make
make test
# cambiar a usuario root
make install
Posteriormente, reinicie el servidor web (para Apache en Red Hat: service apache stop
y luego service apache start
).
Para probar, simplemente vuelva a ver la página Archivo:... (no necesita volver a cargarla).
Para más información, vea los comentarios en PHP: imagecreatefromjpeg (sinopsis de la función).
No es posible guardar la miniatura en el destino
If you get the error "Error generating thumbnail / Error creating thumbnail: Unable to save thumbnail to destination" and the $wgUploadDirectory
directory has the correct permissions (at all levels), check that $wgTmpDirectory
actually exists.
(Unlike some path variables such as $wgCacheDirectory
, $wgTmpDirectory is not created at runtime.)
A more detailed error message may be available if you turn on logging with $wgDebugLogFile
.
This error can also occur when read only mode ($wgReadOnly
) has been set in LocalSettings.php
.
You can try to remove
to see if that solves the issue for you.
$wgReadOnly
Error al crear la miniatura: Código de error: 25
If you get "Error creating thumbnail Error code: 25" with ImageMagick, try increasing $wgMaxShellFileSize
.
Añadir archivos de miniatura manualmente
In situations in which it's not feasible to create the thumbnails dynamically on request (e.g. for very large images, "Error creating thumbnail: unable to extend cache", "Error creating thumbnail: convert: no images defined", and similar), it is possible to manually add the thumbnail files.
This involves creating the smaller images in the desired sizes and uploading them to the thumb/
directory in $wgUploadDirectory
.
For example, a file that has uploaded to:
images/f/f8/Foo.png
should have its thumbnails at:
images/thumb/f/f8/Foo.png/100px-Foo.png images/thumb/f/f8/Foo.png/600px-Foo.png
The pixel size is the horizontal dimension. An example Bash script for creating thumbnails is available at Phabricator:P7049.
Error al crear la miniatura: Código de error: -1 en alojamiento mutualizado de OVH
For unidentified reason, creation of thumbnails on some mutualized OVH hosting are failing with this error, even if running the command in SSH shell works.
Solution is to specifically prevent from using ImageMagick by setting $wgUseImageMagick
to false
in LocalSettings.php:
$wgUseImageMagick = false;
¡Lo sentimos! No hemos podido procesar tu edición debido a una pérdida de los datos de sesión. Por favor inténtalo de nuevo. Si el problema persiste, prueba a cerrar sesión y volver a iniciarla.
Límites de contenido
If your Apache server has the Hardened PHP patch, you may need to edit several variables in your /etc/php.ini file if you wish to have wiki pages with large amounts of content.
In particular, consider the settings for varfilter.max_value_length
, hphp.post.max_value_length
, hphp.request.max_value_length
.
The default settings may limit your pages to less than 10k or 64k in size.
Another possibility is if your Apache server is using mod_security that could be interfering with MediaWiki. You will need to turn it off for MediaWiki to work properly.
No ha especificado un nombre de usuario válido / Ediciones y vistas previas de página completamente en blanco / No se puede cargar
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.
La wiki aparece sin los estilos aplicados y las imágenes están ausentes
If the wiki looks fine if you browse it from the same server where it's being hosted but it appears without CSS styles applied (no colors, no backgrounds, no images, very minimal formatting, etc) if you access it from other machines (or some of them), the most probable cause is that the server is having problems with determining the IP or host name that is being used to access it, or it's misconfigured. This causes URLs to styles and images to be generated using the loopback IP address 127.0.0.1, localhost, or a host name not known outside of the server. You can see the source code of any page and check how URLs look like and what happens if you try to access them directly via your browser.
The solution is to manually specify the $wgServer
variable to the host name that everyone will use to access the wiki.
If your wiki is being accessed from an internal network and an external one, you may need to use the external address for $wgServer
.
Don't forget the port number if you are using a non-standard port as may by the case if your ISP has blocked port 80 (Example: $wgServer = "http://example.domain.com:8080";
)
If styles aren't applied even when browsing the wiki from the server where it's hosted, the problem may be a PHP error on the ResourceLoader load.php
script.
Try to browse the load.php file of your MediaWiki installation with your web browser and see if it displays any errors or just a blank page (see #You see a Blank Page).
You should see a comment similar to /* No modules requested. Max made me put this here */
.
If so, it may be a problem with the web server's .htaccess
file.
If you instead see a 404 Not found error, it may be a problem with the web server's rewrite rules if you attempted to configure Short URLs.
If you are getting 500 error responses from load.php urls, check the webserver's error log files to get more information of the errors.
There seems to be a problem with some PHP versions and Gentoo that causes Apache to segfault.[1]
This can also happen if you have APC enabled, setting apc.serializer=php
in php.ini might help.[2]
Since MediaWiki 1.23, you may end with a wiki with most of the Vector-specific skin styles, like sidebar placed at the end of the page. That may be caused by a low pcre.backtrack_limit set up on some distributions like FreeBSD. It's known to have problems with values of 10 000. Increase that value to 100 000, or the current default of 1 000 000.
Since MediaWiki 1.26, some skins, and specially Vector, may have this problem.
If you see the error Internal error Problematic modules: {"startup":"error"} in the error console of your browser, most likely cause is the lack of permissions of MediaWiki to write to the default temp folder, either because PHP has no permissions to write to /tmp
(C:\WINDOWS\TEMP
on Windows), or because there's an open_basedir restriction and that path isn't included on it.
See task T119934.
You can also set $wgTmpDirectory
if you are unable to change permissions on the system's default temp directory.
Error: palabra mágica 'speciale' inválida
Versión de MediaWiki: | ≥ 1.20 |
If you get that error message after upgrading, you must run the rebuildLocalisationCache.php maintenance script with the --force
option:
php rebuildLocalisationCache.php --force
Las cadenas localizadas muestran su ID de mensaje en lugar de un resultado localizado
If you are seeing this, try running the rebuildLocalisationCache.php maintenance script with the --force
option:
php rebuildLocalisationCache.php --force
This will force MediaWiki to rebuild the localisation cache.
Falta la barra de herramientas de edición, JavaScript no funciona
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 are 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.
Cada página muestra un error fatal, el registro muestra "MagicWordArray::parseMatch: parámetro no encontrado"
Try rebuilding the Localisation Cache:
php maintenance/rebuildLocalisationCache.php
From this thread.
Todas las subidas fallan con el mensaje "El archivo que ha subido parece estar vacío..."
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 "El archivo que has intentado subir parece estar vacío; por favor, verifica que realmente se trate del archivo que intentabas subir.", 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 en Windows: Algunas páginas especiales son inaccesibles
It may happen, on Windows installations under Apache, that some Special pages are inaccessible, giving a error, and in the logs you can see something like this:
[core:error] The given path is misformatted or contained invalid characters: [client 127.0.0.1] AH00127: Cannot map GET /wiki/Special:SpecialPages HTTP/1.1 to file
This can be caused by various PHP bugs. One of them is when the wiki is installed in a NTFS junction. If that's not the problem, upgrading PHP to a newer version can help (see this forum thread)
Al intentar guardar una edición se produce un error "403 Prohibido", o redirige a la página principal
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.
La página de inicio de sesión advierte sobre las cookies desactivadas
Partes de esta página (aquellas relacionadas con esta sección) están desactualizadas. |
You may get a message like MediaWiki utiliza cookies para la autenticación de usuarios. Las cookies están desactivadas en tu navegador. Por favor, actívalas e inténtalo de nuevo.
.
If cookies aren't disabled on your browser, it could be one of those problems:
- You have
$wgSessionsInMemcached
set totrue
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 no funciona cuando las comillas mágicas están habilitadas
Versión de MediaWiki: | ≤ 1.23 |
Versión de MediaWiki: | ≥ 1.24 |
Magic quotes was a feature in PHP that was 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.
Discussions: Thread:Project:Support_desk/Problems_with_installing_mediawiki, Topic:S79xdn9u15xw55vj, Topic:Sdpbmy9q9e0ttp6k, Topic:S7g4rybniat2i36e, Topic:S6vqwk0tysl6m8lc
Error al crear la miniatura: Archivo con dimensiones superiores a 12.5 MP
It may help to increase $wgMaxImageArea
to get rid of the problem (tried with MediaWiki 1.26.2).
Error interno del servidor al abrir cualquier imagen
If images are not displayed on the pages, and manually opening the URL of any image results in an Internal Server Error page, the problem is most likely caused by the .htaccess
file from the images
directory.
This configuration file contains some rewrite rules to prevent old Internet Explorer versions from being affected by a cross site scripting vulnerability.
However, some hosts like strato.de prevents disallow the RewriteOptions
directive in .htaccess, causing any request for a file in the images folder to fail with an error.
If you can't enable rewrite rules on .htaccess file, you may need to comment-out or remove those lines from .htaccess, or the entire .htaccess altogether.
See this thread.
Las ediciones no aparecen en "Cambios recientes", los "Cambios recientes" no se actualizan
By default there's a filter in Recent Changes to hide edits made by bots. Clear this filter and see if the edits appear.
If enabling the display of edits made by bots doesn't make them appear in Recent Changes, the problem is usually in one of the installed extensions, causing an error when Recent Changes are updated. The update of Recent Changes when performing an edit or other action is deferred until the page has been sent to the browser. However, an error can abort such updates, and the error not get displayed to the user. To detect such errors, Set up a debug log file (remember to disable it once you've completed the diagnosis), and save a new edit to a page. If an error happens, it should be logged there —but note it will also log a lot of other things, try to search for "error" or "exception". An error may give a stack trace of the execution, and it may point to an extension likely causing the error.
Ensure your extensions are compatible with your MediaWiki version.
Las páginas de categoría, Especial:LoQueEnlazaAquí y el uso de archivos no se están actualizando
Information about pages contained in a category, links to other wiki pages and images embedded in pages are tracked in special tables.
The update of such tables is not done immediately after the edit is saved, but deferred to the job queue for performance reasons.
If it takes too long to update, you may need to adjust $wgJobRunRate
, or try setting $wgRunJobsAsync
to false
in LocalSettings.php.
This can happen in some installations, especially since MediaWiki 1.27 (see task T142751).
Error: No se pudo abrir el archivo de bloqueo para "mwstore://local-backend/local-public/./../image.png
Check that the "images" directory has permissions which allow writing.
For example: chown -R www-data:www-data images
and chmod -R 777 images
.
If you have SELinux enabled, this could also be problematic.
Aviso: No se ha encontrado un alias para la página especial 'Foo'. ¿Quizás no hay un alias definido para ésta? [Llamada desde SpecialPageFactory::getLocalNameFor en...
You need to create an alias file. So, put something like this in your extension.json file:
"ExtensionMessagesFiles": {
"SpecialMyExt": "MyExt.alias.php"
},
"MessagesDirs": {
"MyExt": [
"i18n"
]
},
Then create an alias file like this:
MyExt.alias.php
<?php
/**
* Aliases for Special:Foo
*
* @file
* @ingroup Extensions
*/
$specialPageAliases = [];
/** English (English) */
$specialPageAliases['en'] = [
'MyExt' => [ 'MyExt' ],
];
Make sure you don't have a $wgMessagesDirs
item with the same key.
Keys of $wgExtensionMessagesFiles
which are also in $wgMessagesDirs
will be skipped.
Advertencia: Argumento inválido suministrado para foreach() en ./includes/objectcache/SqlBagOStuff.php
Probably you just moved your wiki, and didn't import your database, so it's empty.
Warning: Invalid argument supplied for foreach() in ./includes/cache/localisation/LocalisationCache.php on line 459
To fix the warning uncomment in LocalSettings.php line
#$wgCacheDirectory = "$IP/cache";
Parece que hay un problema con su inicio de sesión; esta acción ha sido cancelada como medida de precaución contra el secuestro de sesión. Por favor, vuelva a enviar el formulario.
Please follow Manual:Cómo depurar/Problemas de inicio de sesión .
Llamada a un método no definido
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.
No se pueden ejecutar programas externos, proc_open() está desactivado
The function has been disabled in php.ini
.
This prevents using ImageMagick to resize images to create thumbnails.
Either contact your hosting provider, or try to use gd
instead of ImageMagick
by setting $wgUseImageMagick
to false
.
<span id="CAS_update_failed_on_user_touched
_for_user_ID_'*'_(read_from_slave);_the_version_of_the_user_to_be_saved_is_older_than_the_current_version">
La actualización del CAS falló en user_touched
para el ID de usuario '*' (leído desde el esclavo); la versión del usuario que se va a guardar es más antigua que la versión actual
There are several reasons for this error. One simple one is if the content of user.user_touched is empty or is set to a time in the future.
You might want to check if the server's time is set correctly and synchronized. Also check the contents of that column and fill the column with valid content e.g. with this SQL statement:
UPDATE `user` SET user_touched='20241121115331'
WHERE HEX(
user_touched
)='0000000000000000000000000000';
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- 28 zeroes
Where the date is in YYYYMMDDHHMMSS format for the current date/time. See phab:T247751.
Error de Lua: Error interno
Ocurrió un error de consulta en la base de datos. Esto puede indicar un fallo en el sistema.
If you recently upgraded MediaWiki, or recently installed or upgraded extensions, try running the update.php maintenance script. (See also Manual: Actualización .)
Si aquello no ayuda, entonces realmente puedes tener corrió a un bicho en el software. Try to obtain more details about the query that fails (Manual:Cómo depurar ) and file a bug .
La clave $wgSecretKey es insegura, generada con mt_rand()
Your system does not support /dev/urandom
so the key was generated with mt_rand()
.
See $wgSecretKey
.
MediaWiki requiere PHP 7.4.3 o superior; está usando PHP 7.3.17
If the PHP version on your web server should be recent enough, check if you have several PHP versions installed in parallel.
Create a file called info.php
with the single-line content <?php phpinfo();
and place this file in the web directory.
Access it with your web browser.
It will display the PHP version that is used by your web server.
Errores de PHP
Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes)
Raise PHP's memory limit in php.ini:
memory_limit = 64M ; Maximum amount of memory a script may consume (32MB)
Versión de MediaWiki: | ≥ 1.16 |
You can add a higher value for $wgMemoryLimit
in LocalSettings.php.
Versión de MediaWiki: | ≤ 1.15 |
ini_set('memory_limit', '20M');
Fatal error: Class 'DOMDocument' not found in xxxxxxxx/Preprocessor_DOM.php on line nnn
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
That issue seems to indicate it's a problem with a PHP code accelerator that doesn't match the installed version of PHP or it's outdated. Try upgrading the accelerator. report
Warning: Cannot modify header information - headers already sent by (...)
Most likely, your text editor added a byte order mark (BOM) while you edited MediaWiki's PHP files, but any other content before the opening <?php
causes the same problem.
This usually happens with LocalSettings.php - but see error message for exact file.
Note that BOMs are invisible in most text editors.
To remove the BOM, edit the file with something better than Windows Notepad, but if you don't really have time - open the file with it and choose Save as..., then choose "Unicode (UTF-8 Without signature) - Codepage 65001" as file type.
Strict Standards: date_default_timezone_get(): It is not safe to rely on the system's timezone settings.
If you get Strict Standards: errors in the HTML output, that's because your error_reporting
configuration variable of PHP is set to E_ALL
, but since PHP 5.4.0, E_STRICT became part of E_ALL.
E_STRICT are not errors, but warnings about code interoperability and forward compatibility of PHP code, and they shouldn't be visible in production environments.
Just add your time zone to LocalSetting.php, e.g.
$wgLocaltimezone = 'Europe/Berlin';
The following does not work in all cases. It may be better to put this in the php.ini which must be present in all affected directories.
You may turn off E_STRICT errors putting the following line of code inside your LocalSettings.php , or in case a line with the error_reporting
function exists, replace it with:
error_reporting( E_ALL & ~( E_STRICT | E_NOTICE ) );
You can turn off PHP error reporting entirely using this instead:
error_reporting( 0 );
See also: Setting error reporting in PHP.
If nothing works, please check at the start of your LocalSettings.php file:
If that error happened on the setup process, the LocalSettings.php that it generated could have included the error message at the top of it (example).
If that was what happened, edit the file removing everything before "
" and verify there's nothing (even whitespace) before "<?php
".
<?php
Fatal Error: Cannot redeclare wfprofilein()
This could happen if you upgraded and you have a StartProfiler.php
file in the root MediaWiki installation directory, probably because you enabled profiling in an old installation.
To solve the issue simply remove that file.
Warning: Inaccessible files
After your move, you might see PHP warnings that certain files could not be accessed.
This is most likely caused by task 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 <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 );
This can be used to update wrong path segments and to fix the error.
Versiones de MediaWiki: | 1.17 – 1.26 |
A similar issue can happen when MediaWiki tries to read ResourceLoader 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`;
Fatal error: Uncaught Exception: extension.json does not exist
Versión de MediaWiki: | ≥ 1.25 |
If this error happens when you try to install an extension, it usually means that the extension still requires to use the native PHP require_once
language construct instead of the newer wfLoadExtension()
method.
Errores de instalación
LocalSettings.php not readable
- On a Linux machine, use
chown
orchgrp
to correct the file permissions ofLocalSettings.php
. - On some Linux machines, temporarily disable SELinux by running the command
sudo setenforce 0
.
The installer is unstyled when installing under IIS
The installer is unstyled and instead of the stylesheet, /mw-config/index.php?css=1
shows this error message: "Less_Exception_Parser from line 447 of ...\vendor\oyejorge\less.php\lib\Less\Parser.php: Less.php cache directory isn't writable: C:\Windows\TEMP"
Make sure that the webserver user, who by default is named IUSR
, is allowed to access the C:\Windows\TEMP directory.
At least read and write permissions are necessary.
Error selecting database wikidb: 1044 Access denied for user 'username'@'localhost' to database 'wikidb'
You need to Grant permissions on wikidb.*.
GRANT ALL ON wikidb.* TO 'username'@'localhost' IDENTIFIED BY 'password';
or if your Web Server is on a different box than your DB server - you have to configure remote access to MySQL and grant differently
GRANT ALL ON wikidb.* TO 'username'@'192.168.0.x' IDENTIFIED BY 'password';
NOTE: Replace 192.168.0.x with your Webserver's IP. Also note that the apostrophes (') need to stay.
Database returned error "1142: CREATE command denied to user 'username'@'localhost' for table 'user_properties' (localhost)"
As above, or temporarily use the mysql root user.
Could not find a suitable database driver!
PHP MySQL support is not installed/enabled - See https://php.net/book.mysqli.
Depending on your operating system, you may need to install an additional package.
For example, on debian/ubuntu run sudo apt install php-mysql
.
Filename Case Errors
If you are using a different FTP client than FileZilla to upload files to your server, be sure to configure the client to not force uppercase or lowercase filenames. MediaWiki filenames are case-sensitive.
Incomplete Upload Errors
The MediaWiki package includes a lot of files, spread over dozens of directories. Be careful when uploading. If the transfer is interrupted, you might have missing or incomplete files. You may have to retry your upload several times, especially if you have an unreliable connection.
403 Forbidden with Symbolic Links
If your webserver produces a "403 Forbidden error" page and you are using symbolic links, then make sure your Apache httpd.conf
file has Options FollowSymLinks
to allow symbolic links and that each directory leading up to your linked directory has +x
permission for user running httpd.
HTTP 500 Internal Error during installation
If your webserver produces a "500 Internal Error" at the beginning of the install process, you may need to change the permissions on the mw-config
directory to 755.
If you have changed the permissions for the config directory and still get an unwritable error try changing the owner to Apache.
chown -R apache:apache /var/www/html/mediawiki/*
HTTP 500 Internal Error after installation
If you downloaded the MediaWiki code from Git, and after finishing the installation process, accessing your MediaWiki installation in the web browser produces a "500 Internal Error", go to the MediaWiki installation folder and running the following commands:
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
SELinux
Linux distributions which support SELinux ('Security Extensions') are becoming more widespread. On such systems, PHP scripts will still be unable to write to the config directory, after you have set the normal file permissions. You will also need to use the 'chcon' command to change the SELinux file type.
Required Advertisements on Hosted Sites
If you are running the MediaWiki software on a free site that requires banners or prefix advertising, this may cause MediaWiki not to work, and appear to only generate empty pages beyond the banner advertising. You will have to contact your host to make them make their advertising compatible with MediaWiki, or choose a different host.
Debian, Apache2, and PHP
If you are running the MediaWiki 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:
in the /etc/php5/apache2/php.ini file.
extension=mysqli.so
If that does not work, try the following...
Check that MySQL module for php is installed:
dpkg --list | grep php-mysql
If you need to install the php5-mysql module enter:
apt-get install php-mysql
Then restart Apache2:
/etc/init.d/apache2 restart
'user_password' can't have a default value
Ensure that MySQL is not running in strict mode.
Missing table prefix
If you are using a hosting service, the database name and database username may have an extra prefix (normally the userid given by your hosting provider). For example, if you have created a database named db01 with username u01 and your userid is ocom (given by your hosting provider), you should enter the database name and database username as ocom_db01 and ocom_u01 respectively.
MySQL connection fails with error [2013] or [2002]
If you are getting the error: failed with error [2013] Lost connection to MySQL server during query. or failed with error [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)., this may be caused by using the wrong database host name or by a permissions issue with the mysql.soc file or directory.
If you are using a hosting provider, ensure that you are using the correct host name for the database.
The MySQL manual has a good set of pages on dealing with common errors (such as these). Visit the page for links to documentation for other versions of MySQL.
If you are unsure if MySQL is even installed, try the command mysql
from the command line; if it is not installed, see Manual:Running MediaWiki#System-specific instructions.
UNIX utility binaries not found
Errors include:
- GNU diff3 not found
- Git version control software not found
- ImageMagick not found
PHP must have access to /usr/bin.
In php.ini (probably /etc/php/php.ini
), add :/usr/bin/
to open_basedir config variable as below:
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/var/www/:/usr/bin/
To disable GIT set $wgGitBin
to a path that's allowed but doesn't exist.
$wgGitBin = "";
"Forbidden: You don't have permission to access /mediawiki/ on this server."
This is usually an issue with the configuration of your web server software and unrelated to MediaWiki itself. See for example this Stackoverflow thread or other web server forums.
Too many redirects (ERR_TOO_MANY_REDIRECTS)
When this happens on every page, this is usually caused by a wrong Manual:URL corto configuration, usually because of an error in a redirect rule.
This can also happen when $wgForceHTTPS
is set to true
, and somehow MediaWiki isn't properly detecting the protocol used by the client, and keeps sending a redirect to https:.
This may happen when MediaWiki is set behind a reverse proxy that isn't setting the X-Forwarded-Proto
HTTP header to https
.
Errores de actualización/mejora
Falta el campo rc_timestamp
de la tabla recentchanges
. No debería ocurrir.
Might e.g. happen on upgrading from MW 1.27 to another version. If there is no database content at all you might see this message. See phab:T236671.
This may happen if you didn't specify the same $wgDBprefix
as your original installation, causing MediaWiki to not find its tables.
Check the existing tables on the database and see if they all share a common prefix, and update that setting accordingly.
Another cause may be that you set an empty database. Reinstall the database content from a backup and proceed with migrating.
"Can not upgrade from versions older than 1.31, please upgrade to that version or later first" (or variants)
Some upgrades cannot be performed without an intermediary upgrade. For instance, to upgrade from a wiki older than 1.33 to MW 1.39.1, you will need to upgrade to 1.35 first. See task phab:T326071.
This error message can also be a red herring. It may appear when you are trying to update an empty database, without tables. Create the database first by installing the wiki.
Parsoid / VisualEditor
Véase Parsoid/Troubleshooting y Extension:VisualEditor#Troubleshooting .
Referencias