Project:Support desk

Jump to navigation Jump to search

About this board

Welcome to MediaWiki.org's Support desk, where you can ask MediaWiki questions!

There are also other places where to ask :

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.
  3. To start a new thread, click "Start a new topic".
Previous page history was archived for backup purposes at Project:Support_desk/old on 2015-07-30.
Other languages: English  العربية čeština Esperanto français 日本語 中文
128.125.52.71 (talkcontribs)

On Manual:Footer, it says to put this in the LocalSettings.php to get a "Terms of Use" in the footer:

$wgHooks['SkinTemplateOutputPageBeforeExec'][] = function( $sk, &$tpl ) {

$tpl->set( 'termsofuse', $sk->footerLink( 'termsofuse', 'termsofusepage' ) );

    // or to add non-link text:

    $tpl->set( 'footertext', 'Text to show in footer' );

$tpl->data['footerlinks']['places'][] = 'termsofuse';

return true;

};

From there you can put "Terms of Use" in the page MediaWiki:Termsofuse on your wiki, for the link's text and in MediaWiki:Termsofusepage define the title of the page that you want the Terms of Use link to point to. Note, if you do not create these pages on your wiki, then nothing will appear in the footer.


I don't understand this. I made a page MediaWiki:Termsofuse, and in it I put "Terms of Use". This changed the button in the footer to "Terms of Use." But it links to the page mywiki.org/wiki/⧼termsofusepage⧽. How do I get it to link to the page mywiki.org/wiki/Terms_Of_Use without having to use a redirect? In other words, how do I "define the title of the page" that I want the Terms of Use link to point to? I'm using Mediawiki 1.33.0.

Reply to "Using Manual:Footer"

TimedMediaHandler won't transcode anything

34
Eluphay (talkcontribs)

TimedMediaHandler won't transcode anything, am not really qualified to be making my own wiki, but so far i have gotten most things to work, this is one of two things i can't seem to get to work, am making a local only site just for me and my friends to screw around with, so it does not need to be able to handle work outside of the local network.

it keeps saying, failed transcodes, in the Special:TimedMediaHandler part of the site

i suspect that i might have not setup the locations of the trancoders properly, perhaps someone that knows more could check them for me...

$wgFFmpegLocation = 'C:/Bitnami/wampstack-7.1.30-0/ffmpeg413/bin';

windows location is.... C:\Bitnami\wampstack-7.1.30-0\ffmpeg413, do i included the bin that contains the exes?

$wgFFmpeg2theoraLocation = 'C:/Bitnami/wampstack-7.1.30-0/ffmpeg2theora';

windows location is.... C:\Bitnami\wampstack-7.1.30-0\ffmpeg2theora, exe is in the actual folder on this one.

$wgOggThumbLocation = 'C:/Bitnami/wampstack-7.1.30-0/php/OggTools/bin';

Windows location is... C:\Bitnami\wampstack-7.1.30-0\php\OggTools\bin, do i included the bin that contains the exes?


TimedMediaHandler 0.6.0 (5d59610)21:40, June 13, 2019


Installed software

Product Version
MediaWiki 1.32.1
PHP 7.3.7 (apache2handler)
MySQL 5.7.23
ICU 64.2
Lua 5.1.4


if anyone needs more information, please let me know what they need and i'll try get it for them.

Ciencia Al Poder (talkcontribs)

$wgFFmpegLocation should point to the full path of ffmpeg, not only the folder where it's placed. I guess it should be C:/Bitnami/wampstack-7.1.30-0/ffmpeg413/bin/ffmpeg.exe or similar. The same for other settings.

Eluphay (talkcontribs)

awesome, that seems to have solved the access problem, now i just need to fix my other issues

Eluphay (talkcontribs)

am now getting this error instead,


Error creating thumbnail: "C:/Bitnami/ff/ffmpeg.exe" -threads 1 -ss 137 -y -i "C:\Bitnami\wampstack-7.1.30-0\apps\mediawiki\htdocs/images/b/b0/video.webm" -ss 3 -s 720x480 -f mjpeg -an -vframes 1 "C:\Windows\TEMP/transform_6ca548108731.jpg" 2>&1 wgMaxShellMemory: 32768000 The filename, directory name, or volume label syntax is incorrect.

Ciencia Al Poder (talkcontribs)

The problem seems to be the "2>&1" part of the command executed, which only works on bash shell (linux) and not on Windows. If you can locate it on the code, just remove it and it should work. That's worth a BUGREPORT

Eluphay (talkcontribs)

okay removed the 2>&1 part of the command in TimedMediaThumbnail.php,

now it just says...

Error creating thumbnail: "C:/Bitnami/ff/ffmpeg.exe" -threads 1 -ss 137 -y -i "C:\Bitnami\wampstack-7.1.30-0\apps\mediawiki\htdocs/images/b/b0/video.webm" -ss 3 -s 720x480 -f mjpeg -an -vframes 1 "C:\Windows\TEMP/transform_6ca548108731.jpg" 2>&1 wgMaxShellMemory: 32768000

Ciencia Al Poder (talkcontribs)

There's still a 2>&1 somewhere...

Eluphay (talkcontribs)

Error creating thumbnail: "C:/Bitnami/ff/ffmpeg.exe" -threads 1 -ss 137 -y -i "C:\Bitnami\wampstack-7.1.30-0\apps\mediawiki\htdocs/images/b/b0/video.webm" -ss 3 -s 720x480 -f mjpeg -an -vframes 1 "C:\Windows\TEMP/transform_c415afd9e35c.jpg" wgMaxShellMemory: 32768000


got rid of it, still nothing

Eluphay (talkcontribs)

i forgot to save the changes to TimedMediaThumbnail.php, i was being an idiot, sorry about that

Eluphay (talkcontribs)

still nothing though

Ciencia Al Poder (talkcontribs)

Can you open CMD and execute the command directly?

"C:/Bitnami/ff/ffmpeg.exe" -threads 1 -ss 137 -y -i "C:\Bitnami\wampstack-7.1.30-0\apps\mediawiki\htdocs/images/b/b0/video.webm" -ss 3 -s 720x480 -f mjpeg -an -vframes 1 "C:\Windows\TEMP/transform_c415afd9e35c.jpg"
Eluphay (talkcontribs)

that works, but the server fails to do it itself

Eluphay (talkcontribs)

Obviously their is nothing wrong with the command or ffmpeg then, the server is just not calling the command properly for some reason, what is it doing wrong?, is their a way to fix it?

Ciencia Al Poder (talkcontribs)
Eluphay (talkcontribs)

in the log its still saying the same error, however after i deleted 2>&1 from the php file, the only thing that seemed to change, is the showing of the error message on the page itself, but it still seems to be having this problem internally...


[exec] Error running "C:/Bitnami/ff/ffmpeg.exe" -threads 1  -ss 137 -y -i "C:\Bitnami\wampstack-7.1.30-0\apps\mediawiki\htdocs/images/b/b0/video.webm" -ss 3  -s 720x480 -f mjpeg -an -vframes 1 "C:\Windows\TEMP/transform_540f9f5c2317.jpg": The filename, directory name, or volume label syntax is incorrect.

Eluphay (talkcontribs)

other part of this log was...


File::transform: Doing stat for mwstore://local-backend/local-thumb/b/b0/video.webm/120px--video.webm.jpg

[FileOperation] FileBackendStore::getFileStat: File mwstore://local-backend/local-thumb/b/b0/video.webm/120px--video.webm.jpg does not exist

Creating video thumbnail at C:\Windows\TEMP/transform_31d6904568a5.jpg

File::transform: Doing stat for mwstore://local-backend/local-thumb/b/b0/video.webm/720px-seek=140-video.webm.jpg

[FileOperation] FileBackendStore::getFileStat: File mwstore://local-backend/local-thumb/b/b0/video.webm/720px-seek=140-video.webm.jpg does not exist

Creating video thumbnail at C:\Windows\TEMP/transform_540f9f5c2317.jpg

[exec] MediaWiki\Shell\Command::execute: "C:/Bitnami/ff/ffmpeg.exe" -threads 1  -ss 137 -y -i "D:\Bitnami\wampstack-7.1.30-0\apps\mediawiki\htdocs/images/b/b0/video.webm" -ss 3  -s 720x480 -f mjpeg -an -vframes 1 "C:\Windows\TEMP/transform_540f9f5c2317.jpg"

[exec] Error running "C:/Bitnami/ff/ffmpeg.exe" -threads 1  -ss 137 -y -i "C:\Bitnami\wampstack-7.1.30-0\apps\mediawiki\htdocs/images/b/b0/video.webm" -ss 3  -s 720x480 -f mjpeg -an -vframes 1 "C:\Windows\TEMP/transform_540f9f5c2317.jpg": The filename, directory name, or volume label syntax is incorrect.


This post was hidden by AhmadF.Cheema (history)
Ciencia Al Poder (talkcontribs)

Can you try to change

C:/Bitnami/ff/ffmpeg.exe

to

C:\Bitnami\ff\ffmpeg.exe

In your LocalSettings.php?

Since \ is an escape character in PHP, you may need to use

C:\\Bitnami\\ff\\ffmpeg.exe

185.43.110.30 (talkcontribs)

does not work, same error

Eluphay (talkcontribs)

does not work, same error,


forgot to log in

Eluphay (talkcontribs)

tried both \\, and \.

This post was hidden by 107.242.117.44 (history)
Ciencia Al Poder (talkcontribs)

The error The filename, directory name, or volume label syntax is incorrect is produced by the windows shell.

If executing "C:/Bitnami/ff/ffmpeg.exe" -threads 1  -ss 137 -y -i "D:\Bitnami\wampstack-7.1.30-0\apps\mediawiki\htdocs/images/b/b0/video.webm" -ss 3  -s 720x480 -f mjpeg -an -vframes 1 "C:\Windows\TEMP/transform_540f9f5c2317.jpg" from a command prompt doesn't produce this error, then the version of PHP you're using may have a bug invoking the shell.

Eluphay (talkcontribs)

does the $wgImageMagickConvertCommand variable use the shell?, because its loading convert.exe from imagemagik without problems

Ciencia Al Poder (talkcontribs)

Yes, it uses the shell

Eluphay (talkcontribs)

how come that works fine?, it the php version is not able to use the shell properly, then how does it managed with imagemagik?

Ciencia Al Poder (talkcontribs)

This is a problem with ffmpeg.exe

I've tried the same command on my PC, and changed C:/Bitnami/ff/ffmpeg.exe with notepad.exe, and I get the same error, but if I change it to calc.exe instead I don't get the error

ffmpeg (and notepad) seem to be interpreting something weirdly from the command that cause them to throw that error.

Eluphay (talkcontribs)

interesting..., any idea whats going on?, is it the text formatting or something?

Ciencia Al Poder (talkcontribs)

I don't know, but it doesn't make sense

Eluphay (talkcontribs)

is ffmpeg perhaps accepting text via the shell only when its encoded in unicode or ansi perhaps?, just theorising now. notepad i believe only supports ansi not unicode, ffmpeg probably does support unicode, probably useless, but am just trying to brainstorm here

AhmadF.Cheema (talkcontribs)

Notepad supports Unicode, though depending on the version, the default save format is likely to be ANSI. In recent Windows 10 builds, the default might have been set to Unicode now.

Ciencia Al Poder (talkcontribs)

This doesn't seem to be a unicode issue, since the problem is caused when a path is passed to a program (in some programs it causes an error, in others it doesn't)

Eluphay (talkcontribs)

i haven't used notepad properly since windows 98, which i believe did not support Unicode in those days, obviously it does now, did not know that, good to know though.

either way we still need to figure out whats going on, i assumed that the path was likely not effected by text encoding, it was mostly a wild guess, as i can't think of anything else right now, am able to execute the command purely myself in the command prompt, so ffmpeg can use the command, it seems that the way its receiving the command is effecting it, if am understanding correctly.


Eluphay (talkcontribs)

still trying to fix this, still nothing yet

Reply to "TimedMediaHandler won't transcode anything"

Additional questions at Special:CreateAccount

5
Evolution and evolvability (talkcontribs)

At Special:CreateAccount, it can ask questions such as "Why are you creating another account?". Where is that information stored? Is it public or shown only to checkusers/OTRS?

Bawolff (talkcontribs)
Evolution and evolvability (talkcontribs)

Ah, thanks, I see some examples added in the edit summary on that log page.

Do you know whether it is possible to create additional fields to contain items, such as real name, that are visible only to certain users (equivalent to the email address field).

Bawolff (talkcontribs)

mediawiki has (had? Im not sure it still exists) a real name feature builtin

Account creation is very flexible. Its possible to modify the form using AuthManager but it can be a bit confusing to get the hang of initially

Evolution and evolvability (talkcontribs)
Reply to "Additional questions at Special:CreateAccount"
Tofiq Kərimli (talkcontribs)

Commons files do not appear on my wiki . Previously displayed, but after upgrading the Server Commons Files are not displayed. What can i do? Thank you in advance.

Tofiq Kərimli (talkcontribs)

It seems I could not explain this. Therefore, no one answers me. I want to say: does not open commons.wikimedia files. If this problem cannot be solved, then I need to upload the necessary photos to my site. Do I need to do this? Or wait? I need to wait, what is possible, the problem will be solved?

AhmadF.Cheema (talkcontribs)
Tofiq Kərimli (talkcontribs)

For example, this. These are a list of them all. Everything was normal until the server was updated. Something has changed on the server. Then it happened. I don't know what to do now.

Bawolff (talkcontribs)
Tofiq Kərimli (talkcontribs)

Please enable mediawiki debug logging - I didn't understand it. How can this be done? It is necessary to write in the LocalSettings.php: (I did it.)

error_reporting( -1 );
ini_set( 'display_errors', 1 );
AhmadF.Cheema (talkcontribs)

In LocalSettings.php, set:

$wgShowExceptionDetails = true;

$wgDevelopmentWarnings = true; error_reporting( -1 ); ini_set( 'display_errors', 1); error_reporting(E_ALL);

For more details and setting up a log file, see Manual:How to debug.

Tofiq Kərimli (talkcontribs)

@AhmadF.Cheema,


$wgShowExceptionDetails = true; - I had it.


$wgDevelopmentWarnings = true; - I added.


error_reporting( -1 ); - I added. I had it. But it was a little different: error_reporting (-1);


ini_set( 'display_errors', 1); - I added. I had it. But it was a little different: error_reporting ini_set ('display_errors', 1);


error_reporting(E_ALL); - I added.


Tofiq Kərimli (talkcontribs)


Server Information

Item Detail
Hosting Package Hosting 3 GB
Server Name server
cPanel Version 82.0 (build 14)
Apache Version 2.4.41
PHP Version 5.6.40
MySQL Version 5.7.27
Architecture x86_64
Operating System linux
Shared IP Address 108.61.52.227
Path to Sendmail /usr/sbin/sendmail
Path to Perl /usr/bin/perl
Perl Version 5.10.1
Kernel Version 2.6.32-754.18.2.el6.x86_64

Service Information

Service Details Status
apache_php_fpm up yes
cpanellogd up yes
cpdavd up yes
cpsrvd up yes
crond up yes
dnsadmin up yes
exim (exim-4.92-3.cp1180.x86_64) up yes
exim-587 up yes
ftpd up yes
httpd (2.4.41) up yes
imap up yes
ipaliases up yes
lfd up yes
lmtp up yes
mysql (5.7.27) up yes
named up yes
nginx up yes
nscd up yes
pop up yes
queueprocd up yes
rsyslogd up yes
spamd up yes
sshd up yes
Server Load 1.78 yes
CPU Count 12 yes
Memory Used 54.75% yes
Swap 2.39% yes
Disk / (/) 49% yes
Disk /tmp (/tmp) 3% yes
Disk /boot (/boot) 33% yes
Disk /var/tmp (/var/tmp) 3% yes
Bawolff (talkcontribs)
Reply to "Image from Commons not displaying"
203.185.197.46 (talkcontribs)

Hi everyone,

I installed Mediawiki on a DigitalOcean cpu optimized droplet (vCPUs (Intel Xeon CPU E5-2697A v4 @ 2.60GHz), 4GB of RAM, and 25GB of SSD) on Apache/Mysql.

When I ran importdump.php it added around 110 pages per minute. I decided to move to Google Cloud to see if I could speed this process up.

I have two GCE instances. One for the MariaDB database n1-highmem-2 (x2 Haswell vCPUs, 13 GB memory) 50GB SSD Boot disk and 250GB mounted disk for the drive.

Mediawiki (and importDump.php) are sitting on n1-standard-4 (x4 Haswell vCPUs, 15 GB memory)a 50GBSSD boot disk + 50GB mounted disk drive for Mediawiki. It is running Nginx.

However when I run importDump.php it is even slower at 0.12 pages per second. This suprised me as I think this setup is better than the first. The only difference is that on the GCE server I installed a bunch of Lua Modules and Wikipedia templates.

It appears that it is only using one of the cpu cores and only around 30% of it. Is there a way to get it to run all 4 cores? Is it possible that php is limiting the resource available to it?

I have read a lot about importDump.php and most seem to be getting at least 100 per minute. This study could do 1000 per minute (https://pdfs.semanticscholar.org/7074/cd79c572fb6bbba7ca7e6c98bfb661a08573.pdf).

I am going to install redis and see if that helps, do you have any other recommendations on my setup / settings?


Bawolff (talkcontribs)

the best way to optimize anything is to collect profiling data and see where most of the time is spent (See How to debug for info on how to collect profiling data).

I guess the best way to use multiple cpus would be to split the dump up in multiple parts and import in parallel.


Historically the fastest way to import revisions was to use MWDumper plus the sql dumps of link tables that wikimedia provides. This can skip the parse step. However MWImporter isnt really well maintained anymore.

203.185.197.46 (talkcontribs)

Hi Bawolff, thanks for your advice. I did look into MWDumper but it seemed quite buggy so decided to stick with the php dump.

I will look into collecting some profile data and report back on my findings.

After installing Redis it has made a SIGNIFICANT impact. CPU usage is sitting around 80% and it is now importing roughly 90 per minute (much better than the previous 7.2 per minute!)

Splitting the dumps and importing in parallel is some great advice too.

Reply to "importDump.php Performance"
FrugalTPH (talkcontribs)

How would I go about inserting an mbox/abox on any page a user visits which is protected from them?

MarkAHershberger (talkcontribs)

How are you protecting the pagss?

FrugalTPH (talkcontribs)

Using the built-in More > Protect function, and selecting "Allow Only Administrators", infinite. Reason = "This policy is set by the shareholders". It would be nice if I could show the reason as part of the mbox, a little like the mbox they use here to show Archived Extensions, e.g.


<img of a padlock to the left of the text>

This page is Protected

Authority: <username who locked it>

Reason: <reason given for protection>

MarkAHershberger (talkcontribs)

You could use Scribunto to check a page's protectionLevel and display a template if necessary.

FrugalTPH (talkcontribs)

Thanks for responding @MarkAHershberger.

I've made an appropriate template to insert, but am unsure about how to have that auto-insert at the top of any protected page. Would I do that via MediaWiki:Common.js?

AhmadF.Cheema (talkcontribs)

One method could be to export Wikipedia's Module:Protection banner or some other protected template with the Include templates option checked and then import them into your own Wiki.

After that make the necessary edits which correspond to your Wiki, such as changing links etc.

Reply to "Show messagebox on protected pages"
66.220.103.221 (talkcontribs)

Hello, our church has a or had an account called uufco and I am unable to sign into it. I am sure no one has been on the site for quite awhile so maybe it is inactive. Please advise.


Mayme Trumble

maymet@mac.com


66.220.103.221 (talkcontribs)

I repeatedly put the wrong name and then the wrong password. So sorry to bother you!! I am able to login now!

How to turn an extension on for desktop but off for mobile

4
128.125.52.225 (talkcontribs)

Is there a way to have an extension on for desktop mode but off on mobile mode? For example, Extension:AddThis

AhmadF.Cheema (talkcontribs)

There would probably be some JavaScript, PHP method to do so, but the easier option would be to just hide the widget through MediaWiki:Mobile.css.

207.62.238.123 (talkcontribs)
AhmadF.Cheema (talkcontribs)

The following should work:

#addthistoolbar { display: none; }
Reply to "How to turn an extension on for desktop but off for mobile"

Templates largely broken after 1.30 -> 1.33

2
Scarred Sun (talkcontribs)

I performed an upgrade from 1.30 to 1.33 and as a result seem to have lost a lot of content from the Template namespace from rendering properly; for example, looking at https://segaretro.org/Kamen_Rider_555 you'll see that many of the templates which support the page are outright broken. How do I recover these?

Bawolff (talkcontribs)

the link does not appear to go to a mediawiki install?

Reply to "Templates largely broken after 1.30 -> 1.33"
2804:431:D700:E92C:8484:87D8:BB78:DB41 (talkcontribs)

Eu instalei centralauth.Mas fala:erro no banco de dados.Isto pode indicar um bug no software.o que será?

Aí está o que está acontecendo:


[6bf0f30d98c341e127caafc0] /w/index.php/Especial:Privil%C3%A9gios_globais_de_grupo Wikimedia\Rdbms\DBQueryError from line 1587 of C:\wamp\wiki\w\includes\libs\rdbms\database\Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT distinct ggp_group FROM global_group_permissions

Function: CentralAuthUser::availableGlobalGroups

Error: 26 file is not a database

Backtrace:

#0 C:\wamp\wiki\w\includes\libs\rdbms\database\Database.php(1556): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)

#1 C:\wamp\wiki\w\includes\libs\rdbms\database\Database.php(1274): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)

#2 C:\wamp\wiki\w\includes\libs\rdbms\database\Database.php(1784): Wikimedia\Rdbms\Database->query(string, string)

#3 C:\wamp\wiki\w\includes\libs\rdbms\database\DBConnRef.php(53): Wikimedia\Rdbms\Database->select(string, string, array, string)

#4 C:\wamp\wiki\w\includes\libs\rdbms\database\DBConnRef.php(297): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#5 C:\wamp\wiki\w\extensions\CentralAuth\includes\CentralAuthUser.php(2898): Wikimedia\Rdbms\DBConnRef->select(string, string, array, string)

#6 C:\wamp\wiki\w\extensions\CentralAuth\includes\specials\SpecialGlobalGroupPermissions.php(78): CentralAuthUser::availableGlobalGroups()

#7 C:\wamp\wiki\w\extensions\CentralAuth\includes\specials\SpecialGlobalGroupPermissions.php(71): SpecialGlobalGroupPermissions->buildMainView()

#8 C:\wamp\wiki\w\includes\specialpage\SpecialPage.php(569): SpecialGlobalGroupPermissions->execute(NULL)

#9 C:\wamp\wiki\w\includes\specialpage\SpecialPageFactory.php(558): SpecialPage->run(NULL)

#10 C:\wamp\wiki\w\includes\MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

#11 C:\wamp\wiki\w\includes\MediaWiki.php(865): MediaWiki->performRequest()

#12 C:\wamp\wiki\w\includes\MediaWiki.php(515): MediaWiki->main()

#13 C:\wamp\wiki\w\index.php(42): MediaWiki->run()

#14 {main}


~~~~

Bawolff (talkcontribs)

you need to setup the sql tables for the CentralAuth global db. See the installation instructions at extension:CentralAuth

Reply to "Error"