Project:Support desk

About this board

Welcome to the MediaWiki Support desk, where you can ask MediaWiki questions!

(Read this message in a different language)

See also

Before you post

Post a new question

  1. To help us answer your questions, please indicate which versions you are using, as found on your wiki's Special:Version page:
    • MediaWiki version
    • PHP version
    • Database type and version
  2. Please include the web address (URL) to your wiki if possible. It's often easier for us to identify the source of the problem if we can see the error directly.
  3. To start a new thread, click "Start a new topic".

Создание Википедии

2
Скипенко Тимофей (talkcontribs)

Добрый день, могу я внести свою википедию в поисковик?

213.230.93.114 (talkcontribs)

1633

Reply to "Создание Википедии"
213.230.93.114 (talkcontribs)

tt8788

213.230.93.114 (talkcontribs)

lgbt52009

213.230.93.114 (talkcontribs)

24681012

Reply to "logbt"

Reffering to Ancient Knowledge of all languages of all Lands And all knowledge have been and are belong to all nations and all generations EQUALY

1
MILKYWAYSUNIVERS (talkcontribs)

Hello

Dear Madams and Sirs,

Attentions

Alll wrong decisions and all wrong laws as chosen ideas of people and all wrong educations systems and all wrong types of ideas reffering to all nations have been and are and will be thier own unhealthy chosen decisions as generations of all generations . They should not at all chosen unhealthy decisions and countinuely with thier selfishnesse denying and justifying themselves as nations of Roman Empire , Greece, Italy, Spain , Romania, Egypt , France , aTurkey , China , Japan , Korea, Iran- Persia , African countries, Australia, Newzeland, Lebenan , Auutria, Greece, Tiland m Tiwan , African countries, Sweden , Switzerland, Finland , Denmark , India, Pakesyan , Afghanistan, all other too

Reply to "Reffering to Ancient Knowledge of all languages of all Lands And all knowledge have been and are belong to all nations and all generations EQUALY"

Error on Special:Version after moving a wiki

1
59.9.24.33 (talkcontribs)

I did move the MW to new hosting account (same php version, 7.4.33) and upgrade relatively successfully. (copy DB, upload new MW files (1.40.1) and execute mw-config/index.php)

and all articles looks well-opened but when I open Special:Version, it makes error below.

Warning: is_readable(): open_basedir restriction in effect. File(/gitinfo/info.json) is not within the allowed path(s): (/var/www/clients/client338/web1632/web:/var/www/clients/client338/web1632/private:/var/www/clients/client338/web1632/tmp:/var/www/smile.sfuhost.com/web:/srv/www/smile.sfuhost.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in /var/www/clients/client338/web1632/web/includes/GitInfo.php on line 173

Warning: is_readable(): open_basedir restriction in effect. File(/gitinfo/info-skins-MinervaNeue.json) is not within the allowed path(s): (/var/www/clients/client338/web1632/web:/var/www/clients/client338/web1632/private:/var/www/clients/client338/web1632/tmp:/var/www/smile.sfuhost.com/web:/srv/www/smile.sfuhost.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in /var/www/clients/client338/web1632/web/includes/GitInfo.php on line 173

(the rest omitted)


I tried to find answers and added '$wgGitBin = false;' on LocalSettings.php but it didn't help. is there any other method to solve this? I cannot edit 'php.ini' because server isn't mine.


Thank you in advance.

Reply to "Error on Special:Version after moving a wiki"

Error when uploading a file

1
82.33.253.34 (talkcontribs)

The file for "chunk" could not be stored for processing due to a server misconfiguration (write failed).

Reply to "Error when uploading a file"

Using .htaccess to remove a range of subdirs

15
Vicarage (talkcontribs)

I want to use replace an existing website with mediawiki, but to preserve incoming links I need to remove some path names using .htaccess

So https://subbrit.org.uk/sites/fan-bay-deep-shelter should become https://subbrit.org.uk/fan-bay-deep-shelter, ditto features and a few more

I already use the shortURL logic to shorten paths

LocalSettings.php

$wgScriptExtension = ".php";
$wgArticlePath = "/$1";
$wgUsePathInfo = true;
$wgScriptPath = "";

.htaccess

RewriteEngine On 
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f 
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d 
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]

But my attempts to add new rules like

RewriteRule ^sites/(.*)$ /$1 [L]

just don't take effect, it just asks if I want to create a new page Sites/fan-bay-deep-shelter. The rules do work on the server away from the wiki area

Jonathan3 (talkcontribs)

I've not checked but how about putting the "sites" line as the first thing after "RewriteEngine On"?

Bawolff (talkcontribs)
Vicarage (talkcontribs)

Moving the line around and changing the flags doesn't help, I suspect that the problem is that the rewrite does not fundamentally change the URI Mediawiki processes, this is after all why

RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]

can work. I fear there are many thousand #REDIRECTs in my future

Bawolff (talkcontribs)

In throry the [R,L] flag should change the url mediawiki processes because it should restart the request

Vicarage (talkcontribs)
Jonathan3 (talkcontribs)

I've got the same $wgArticlePath and $wgScriptPath settings as you, and the same original four lines in .htaccess. In between "RewriteEngine On" and the rest, I have "RewriteRule" lines. One ends with "[R=301,L]" and another "[R=301,NC,L]". Don't ask me what "NC" means now, but it all seems to work all right!

There's a non-.htaccess way of organising redirects. Maybe your Apache is not set up to obey .htaccess, and you had previously got short URLs to work the other way. That might explain why your changes are having no effect. How about removing the original four lines, or adding something simple but absurd, and seeing whether it changes anything.

Vicarage (talkcontribs)

NC is case insensitive. I can see the rule changing things if I disable the conventional shortening logic, its the combination that doesn't work. I checked, the apache server configuration on my test machine is clean. a server conf solution wouldn't be acceptable for the production solution anyway, as that's hosted.

Jonathan3 (talkcontribs)

What are the full contents of your .htaccess now?

Vicarage (talkcontribs)
      RewriteEngine On
      RewriteRule ^Sites/(.*)$ /$1 [NC,R]  
      RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f 
      RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d 
      RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]
Jonathan3 (talkcontribs)

What about changing the flags on the second line to "[R=301,NC,L]"?

Vicarage (talkcontribs)

Internal server error with the 301, with either L (which stops the rewrites, which I'm sure I don't want) or R

Jonathan3 (talkcontribs)

You say either L or R, but what about trying both, as suggested?

I've tried the following out and it works for me, e.g. it'll show example.com/Main_Page as normal, and will also convert example.com/sites/Main_Page to example.com/Main_Page.

RewriteEngine on
RewriteRule ^sites/(.*)$ /$1 [R=301,NC,L]  
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]

There must be something different about your server if that doesn't work.

Vicarage (talkcontribs)

I'm getting caught up with caches on my local webserver and different browsers. Sometimes it works, sometimes not. I will check on the production webserver and report back.

Vicarage (talkcontribs)

Seems to be working with a clean install on my production server. Thank you both for your help

Reply to "Using .htaccess to remove a range of subdirs"

Wiki not working after move to different folder

1
Af19x (talkcontribs)

I'm having a little problem after moving a wiki.

My hoster limited the number of subdomains, which is why I had to move my wiki (version 1.34.1.)

MySQL (5.7.42-0ubuntu0) and PHP version (7.4.33) are identical. I wanted to upgrade PHP to 8.x after the move.

So I copied all the files from the server to my computer using FTP and then uploaded them to the new folder on the same virtual server.

Old address: http://wiki.mydomain.de (subdomain must be removed by the end of the year)

New address: http://subdomain.mydomain.de/wiki (subdomain already existed and will be kept)

If I create an HTML file in the new server path and connect to it with a browser, the page displays without any problems. I checked this first before continuing.

Then I corrected the path for $wgServer to “http://subdomain.mydomain.de/wiki” in LocalSettings.php

If I rename the HTML file, the browser uses the index.php from MediWiki and something is displayed, but without any formatting (complete CSS is missing). Tried with Edge and Mozilla, both show the same error.

There is also a message that the wiki can only be viewed after logging in, which is how it was configured.

But the links on the homepage all point to "http://subdomain.mydomain.de/..." instead of "http://subdomain.mydomain.de/wiki/..." somehow the wiki subdirectory doesn't appear to be known even though the LocalSettings.php has been changed. Of course, all links bring a 404 error too.

Everything still works fine at the old address.

Quick help would be great!

Thank you very much and have a nice weekend

Reply to "Wiki not working after move to different folder"

Difficult upgrade 1.39 > 1.40

8
Summary by Gennievre

I asked a new, slightly different question about the upgrade

Gennievre (talkcontribs)

Hello

I tried to upgrade from 1.39 to 1.40.1

I published all the 1.40 files on top of my 1.39 installation as I usually did.

However, I'm getting a lot of errors.

Can anyone help?

You can see the errors list at https://www.gennievre.net/wiki/index.php?title=Accueil

Jonathan3 (talkcontribs)

I don't know. They say it's better not to add the new files over the existing ones. Maybe try again without doing that? What other steps did you take when upgrading?

Gennievre (talkcontribs)

Thanks for this reply, I'll try to get my backup back online. And redo a different installation.

TheDJ (talkcontribs)

This looks like a missing composer package. You did not (correctly) update the vendor directory most likely.

Gennievre (talkcontribs)

Thank you for your reply, but I don't know how to correct it. Do you have a suggestion?

Jonathan3 (talkcontribs)

This rings a bell. Once I decided to use git for MediaWiki core. I think the vendor directory is in the tarball but with git you have to run an extra command using composer. There's a page here: Download from Git. I now just use the tarball, extract it into a new folder, then copy across the old files I still need.

Gennievre (talkcontribs)

Thank you for this reply, but I don't understand the answer. I downloaded a zip archive which decompressed without any error message and I published it using ftp.

Jonathan3 (talkcontribs)

This is based on what I'd try rather than what I know, but if doing from scratch (without overwriting the existing files) doesn't work, maybe try disabling all your extensions. You might get some ideas at Manual:Upgrading.

Gennievre (talkcontribs)

Hello

Where can I find the step-by-step process for upgrading from version 1.39 to version 1.40.1 without taking any risks?

Windows PC + Filezilla

--------------------

Mise à niveau mediawiki

Où puis-je trouver le processus pas à pas pour passer de la version 1.39 à la version 1.40.1 sans prendre de risques ?

PC sous Windows + Filezilla

Reply to "Mediawiki upgrade"

how do i edit the sidebar

2
91.106.52.10 (talkcontribs)

wikis typically have like custom stuff in the sidebar to take you to certain pages like certain categories, how would i go about doing this for my wiki (i use miraheze)

Clump (talkcontribs)
Reply to "how do i edit the sidebar"