Open main menu

MediaWiki β

Project:Support desk

About this board

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

There are also other places where to askCommunication: IRCCommunication#Chat, mailing listsMailing lists, Wikimedia Developer Support, Q&A, mwusers (unofficial forum) etc.

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

PHP Warning: Error while sending QUERY packet. PID=29477 in includes/libs/rdbms/database/DatabaseMysqli.php on line 47

6
2A04:2413:8300:8480:308A:4942:A17:DA31 (talkcontribs)

[13-Jan-2018 16:58:09 Europe/ ]PHP Warning:  Error while sending QUERY packet. PID=29477 in /includes/libs/rdbms/database/DatabaseMysqli.php on line 47

Mediawiki 1.30.0

I had the same warnings in 1.23

2A04:2413:8300:8480:308A:4942:A17:DA31 (talkcontribs)

No one has a clue from where this is happening?

2001:16B8:10D4:9000:E9F1:6908:75B4:4232 (talkcontribs)

MySQL has limitation for the size of data. You either need to break your query in small groups of records or you can change your max_allowed_packet in MySQL. I would opt for the second.

2A04:2413:8300:8480:308A:4942:A17:DA31 (talkcontribs)

Thank you. I asked my host provider about that value because I don't have it in php ini or user.ini.

2A04:2413:8300:8480:88B1:1FC1:FFB5:ED5C (talkcontribs)

16 Mb was the answer. Is that enough for mediawiki 1.30?

109.166.131.100 (talkcontribs)

Or what is the recomended value for mediawiki 1.30?

Reply to "PHP Warning: Error while sending QUERY packet. PID=29477 in includes/libs/rdbms/database/DatabaseMysqli.php on line 47"
Bttfvgo (talkcontribs)

Hi! I have MySQL 5.7.20 and I think I messed up terribly. I noticed my database was in latin1 and so I followed the instructions on this page (http://tlug.dnho.net/?q=node/276) to change it into utf8. Well that didn't work. And now half of my information is gone! I've tried restoring multiple times and even reversing the steps. Is the info gone for good or can I get it back!?

Ciencia Al Poder (talkcontribs)

If you have the original SQL script, that's your backup and restoring it should work, but the --default-character-set=latin1 --skip-set-charset options may skip some importan information from the original database. If the original data was really latin1, importin it with --default-character-set=latin1 should work. However, I doubt MediaWiki would use latin1 for database even in the more older versions. Maybe it wasn't in latin1 at all, or even if the database default was latin1, tables were created as utf8 (the charset can be specified for each table).

If you made any modification to MediaWiki configuration like Manual:$wgDBTableOptions you'll need to restore them as well.

Reply to "Restoring a backup"
PSIDWiki (talkcontribs)

Hello,

I had a huge requirement change so I had to start my site all over with the following software versions:

-Python 3.4 64-bit

-MySql 5.7.21 64-bit

-PHP 7.0.21

-MediaWiki 1.30

I create 2 accounts with the option to send the user the temporary password, but neither email account has received anything. In LocalSettings.php I have the following:

$wgEnableEmail = True;

$wgEnableUserEmail = True; # UPO

$wgEmailAuthentication = True;

$wgSMTP = array(

'host'     => "smtp.com", // could also be an IP address. Where the SMTP server is located

'IDHost'   => "tempsite.com",      // Generally this will be the domain name of your website (aka mywiki.org)

'port'     => 25,                 // Port to use when connecting to the SMTP server

'auth'     => True,               // Should we use SMTP authentication (true or false)

'username' => "SMTPUser",     // Username to use for SMTP authentication (if being used)

'password' => "SMTPPassword"       // Password to use for SMTP authentication (if being used)

);

I'm not sure how to test it other then to create more accounts.

Ciencia Al Poder (talkcontribs)

Once an account is created, if it has a configured mail, you can request a new password by email

Reply to "How to test email function"

Is licensing notice required for third-party websites using MediaWiki?

1
George Ho (talkcontribs)

I went to https://en.pornopedia.com/wiki and could not find the terms "GNU", "General Public", "GPL" or anything related. Is licensing notice of the GNU General Public License required for certain sites using MediaWiki? If so, whom can I contact about this?

Reply to "Is licensing notice required for third-party websites using MediaWiki?"

Is it possible to set some pages to update later?

3
Banaticus (talkcontribs)

We have some changes to some pages on our wiki that we'd like to push out later, but they can't go live yet. Is there some sort of delayed update extension?

Fokebox (talkcontribs)

May be you can make some template for such reasons

Banaticus (talkcontribs)

Well, we could create template X, Y, Z, and then edit pages a, b, c to add those templates, but we want to actually edit the pages so that it's shown in the page edit history.

Reply to "Is it possible to set some pages to update later?"

Automatically redirect external links

2
Andrewschlussel (talkcontribs)

Our wiki is not connected to the internet, it is internal only.

Any URL on our wiki is therefore a broken link.

I was wondering if there was a way to automatically redirect any link to an external page to a page that describes that they will need to copy the link and put it into an internet enabled browser.

So for example, if a page on the wiki had a link to www.google.com and you clicked on that, it would take you to a page that said:

"www.google.com is an external link and cannot be viewed on this browser. Click here to copy the link, then paste it into your internet enabled browser."

星耀晨曦 (talkcontribs)

You can add the js for the behavior to MediaWiki:common.js

Krayfishkarl (talkcontribs)

I've been getting some complaints from the users of my site about error messages regarding account creation. Specifically, when trying to create an account, they get "Forbidden. Please submit form again. " or a variant that says "You submitted too quickly." I tested this out myself and it's been fairly inconsistent. Sometimes, I'm able to create an account after one try, but other times I can't at all after five or more tries.

After doing some digging, I found that temporarily disabling CleanTalk (from the Antispam plugin) allows one to register their account with no further hindrances. I don't quite understand why CleanTalk has to do it with it though because to my knowledge, a different error message regarding blacklisting appears if a spambot tries to register. However, I am hesitant to turn CleanTalk off in the long term because it actually does its job really well at blocking spam. It blocks about 300 - 400 attacks per week with only one or two misses every now and then.

I haven't been able to find any other topics regarding similar issues, so I was wondering what I could do to be able to fix this.

Reply to "Forbidden. Please submit form again."
Deluge Lights (talkcontribs)

Hi, is there a built-in way to store user uploaded images on object storage instead of directly to the local drive? I was thinking of using a service such as DigitalOcean Spaces, Backblaze B2, or Amazon S3 buckets due to scalability and other concerns. I see there's an extension for Amazon S3, but is there something for the other services? If I was to create an extension for this, could someone please point me in the right direction as to what documentation I should be looking at? Thanks.

Reply to "Storing images on object storage"

Error loading data from server: 404: parsoidserver-http: HTTP 404

18
Hvdeynde (talkcontribs)

Environment:

OS: Ubuntu 14.04.4 LTS

MediaWiki: 1.26.2

wiki url: http://intranet.hit.local/wiki-hitit/

parsoid listener port: 8142

After a good day of trying to set up VirtualEditor, the above error is still with us.

I think I followed the instructions in

- https://www.mediawiki.org/wiki/Extension:VisualEditor

- https://www.mediawiki.org/wiki/Parsoid/Setup

though, I'm still uncertain about the url/uri.

/var/www/html/wiki-hitit/LocalSettings.php has the following entries for VisualEditor:

### VisualEditor

require_once( "$IP/extensions/VisualEditor/VisualEditor.php" );

$wgDefaultUserOptions['visualeditor-enable'] = 1;

$wgSessionsInObjectCache = true;

$wgVirtualRestConfig['modules']['parsoid'] = array(

'url' => 'http://localhost:8142/wiki-hitit/',

'prefix' => 'wiki-hitit'

);

/etc/mediawiki/parsoid/localsettings.js has the following entries:

'use strict';

exports.setup = function(parsoidConfig) {

parsoidConfig.setMwApi({ prefix: 'wiki-hitit', uri: 'http://localhost/wiki-hitit/api.php' });

parsoidConfig.useSelser = true;

};

/var/www/html/wiki-hitit/extensions/parsoid/localsettings.js has these:

'use strict';

exports.setup = function(parsoidConfig) {

parsoidConfig.setMwApi({

prefix: 'wiki-hitit', // optional

uri: 'http://localhost/wiki-hitit/api.php' });

parsoidConfig.useSelser = true;

};

The api.php is accessible:

$ curl 'http://localhost/wiki-hitit/api.php' | head

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

Dload  Upload   Total   Spent    Left  Speed

0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

<!DOCTYPE html>

<html lang="en" dir="ltr" class="client-nojs">

<head>

<meta charset="UTF-8" />

<title>MediaWiki API help - Hitit</title>

The wiki pages now have both an 'edit' and an 'edit source' tab.  But when you press the 'edit' tab, you get a pop-up with this error message:

"Error loading data from server: 404: parsoidserver-http: HTTP 404. Would you like to retry?"

I've found several articles about this issue, but none that helped.

Is the url/uri definition correct? (All examples I found used simple urls.)

Are there any log files I can check?  I tried the parsoid and apache2 logs, but there's nothing there.

Any other suggestions?

Kind regards,

Herta

Ciencia Al Poder (talkcontribs)

There's a 404 error somewhere, try to find in apache error logs the URL being requested, that should give you a hint what configuration is wrong. Maybe you need to omit the "prefix" configuration part

Hvdeynde (talkcontribs)

Thanks for your reply.

There's nothing in the apache error log. The access log has this entry:

10.32.14.57 - - [29/Feb/2016:09:59:13 +0100] "GET /wiki-hitit/api.php?action=visualeditor&format=json&paction=parse&page=Main_Page&uselang=en HTTP/1.1" 200 511 "http://intranet.hit.local/wiki-hitit/index.php/Main_Page?veaction=edit" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0"

10.32.14.57 - - [29/Feb/2016:09:59:13 +0100] "GET /wiki-hitit/load.php?debug=false&lang=en&modules=ext.visualEditor.base%2Ccore%2Cdata%2CdesktopArticleTarget%2Cicons%2Clanguage%2Cmediawiki%2Cmwalienextension%2Cmwcore%2Cmwformatting%2Cmwgallery%2Cmwimage%2Cmwlink%2Cmwmeta%2Cmwreference%2Cmwtransclusion%7Cext.visualEditor.core.desktop%7Cext.visualEditor.mwimage.core%7Cext.visualEditor.mwreference.core%7Cext.visualEditor.mwtransclusion.core%7Cjquery.autoEllipsis%2CbyteLimit%7Cjquery.uls.data%7Cmediawiki.ForeignApi%2Cwidgets%7Cmediawiki.ForeignApi.core%7Cmediawiki.action.history.diff%7Cmediawiki.api.options%7Cmediawiki.language.names%2CspecialCharacters%7Cmediawiki.page.gallery.styles%7Cmediawiki.skinning.content.parsoid%7Cmediawiki.widgets.CategorySelector%2Cstyles%7Cmoment%2Coojs%2Coojs-ui%2Cpapaparse%2Crangefix%2Cunicodejs%7Coojs-ui.styles%7Coojs-ui.styles.icons%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cindicators%2Ctextures&skin=monobook&version=10061a186059 HTTP/1.1" 200 2196466 "http://intranet.hit.local/wiki-hitit/index.php/Main_Page?veaction=edit" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0"

Hvdeynde (talkcontribs)

P.S. I removed the prefix from the three config files and restarted parsoid and apache2, but the error remains.

Swennet (talkcontribs)

I think the URI in your LocalSettings.php file should be

'url' => 'http://localhost:8142'

.

So without the

/wiki-hiti/

part. Let us know if that works :)

Hvdeynde (talkcontribs)

After much trial and error, that is indeed what fixed it.

Thanks, Swennet.

Andreyshade84 (talkcontribs)

@Hvdeynde, how you solve this issue? Pleace post your config files

143.196.159.101 (talkcontribs)

Hello all,

After spending a LOT of time to let VisualEditor extension be able to work on my Wiki (I tried every possibilities for both parsoid setting file and LocalSettings file), I finally found a simple conf that actually works for me. So, that's what I am sharing below.

For your information :

-running on Debian,

-mediawiki 1.26.2,

-wiki's name si WikiName,

-it's located in /var/www/WikiName,

-IP adress of my wiki is IP_adress (like 123.123.123.123).

In /etc/mediawiki/parsoid/setting.js, what has changed from the original file is following below:

parsoidConfig.setMwApi({ prefix: 'IP_adress', uri: 'http://IP_adress/WikiName/api.php' );

In LocalSettings.php:

$wgVirtualRestConfig[‘modules’][‘parsoid’] = array(

           

‘url’ => ‘http://IP_adress:8142’

);

Everything else is useless for me (like domain for instance). I think that 'Localhost' is not working on recent wiki (my visual editor was not working since I updated my wiki), that's why I think you should try to put some IP adress of yours to make it work insteasd of localhost.

I hope it will help a few of you!

@+

KrazyMax

143.196.159.101 (talkcontribs)

Sorry for the bad layout, looked much better before it was actually posted!

KrazyMax

YasoKuuhl42 (talkcontribs)

Hello,

it dosnt work to me.

MediaWiki 1.28.0

i become 404

LocalConfig.php:

wfLoadExtension( 'VisualEditor' );

// Enable by default for everybody $wgDefaultUserOptions['visualeditor-enable'] = 1;

// Optional: Set VisualEditor as the default for anonymous users // otherwise they will have to switch to VE // $wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";

// Don't allow users to disable it $wgHiddenPrefs[] = 'visualeditor-enable';

// OPTIONAL: Enable VisualEditor's experimental code features

$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;

$wgVirtualRestConfig['modules']['parsoid'] = array(

      // URL to the Parsoid instance
      // Use port 8142 if you use the Debian package
      'url' => 'http://XXX.XXX.XXX.XXX:8142',
      // Parsoid "domain", see below (optional)
      //'domain' => 'XXX',
      // Parsoid "prefix", see below (optional)
      //'prefix' => 'XXX'

);

localsettings.js:

parsoidConfig.setInterwiki( { prefix: 'XXX.XXX.XXX.XXX', uri: 'http://XXX.XXX.XXX.XXX/mediawiki/api.php' } );

Ciencia Al Poder (talkcontribs)

From previous messages I see the config is parsoidConfig.setMwApi, not parsoidConfig.setInterwiki. Can you check that's correct?

YasoKuuhl42 (talkcontribs)

Thanks. But ist the same 404 -.-

   parsoidConfig.setMwApi({ prefix: 'XXX.XXX.XXX.XXX', uri: 'http://XXX.XXX.XXX.XXX/mediawiki/api.php'});
Ciencia Al Poder (talkcontribs)

does opening http://XXX.XXX.XXX.XXX/mediawiki/api.php load the api help page when opening the URL from the server?

YasoKuuhl42 (talkcontribs)

yes

YasoKuuhl42 (talkcontribs)

Other ideas?

Ciencia Al Poder (talkcontribs)

You may try asking in the #mediawiki-visualeditorconnect IRC channel.

172.251.84.63 (talkcontribs)

Note:

I got this exact error due to putting a forward slash at the end of the Parsoid URI. In other words, http://localhost:8142/ caused the error, and changing it to http://localhost:8142 fixed it.

This is what it looks like in my MediaWiki 1.28 LocalSettings.php--this works!

# Visual Editor

require_once("$IP/extensions/VisualEditor/VisualEditor.php");

$wgDefaultUserOptions['visualeditor-enable'] = 1;

$wgHiddenPrefs[] = 'visualeditor-enable';

$wgVisualEditorParsoidURL = 'http://localhost:8142';

$wgVirtualRestConfig['modules']['parsoid'] = array(

        'url' => 'http://localhost:8142',

        'domain' => 'localhost'

);

TerraBase (talkcontribs)

...sometimes it's the simple things too. Have you checked your Apache, HTTPD (or whatever web server your using) configuration files? Read this; MediaWiki Visual Editor Parsoid 404 Error.

Sorry for re-opening this closed issue, but in all the reading I did on all the different sites that address this issue, no one actually came out and said check the web server configuration. Yes it seems obvious in hind site to me, but while working the problem, I became so fixated on the Mediawiki and Parsoid stuff, the 'basics' never crossed my mind. I also posted here because this page happens to be first in the Google search results.

Reply to "Error loading data from server: 404: parsoidserver-http: HTTP 404"
106.203.64.122 (talkcontribs)

Hi,

I would like to create how to manual website like wikihow. In wikihow the page title is different from page url, Suppose if page title "How to create a website" then the page url is "wikihow.com/create-a-website". the word "how to" is no there in page url. In same way i want to implement this in my mediawiki project. I googled it but can't able to find related tutorial for this topic.

AhmadF.Cheema (talkcontribs)

For having page titles different from their URLs, see {{DISPLAYTITLE:title}} from Help:Magic words#Technical metadata and Manual:$wgRestrictDisplayTitle.

Reply to "How to create pages like wikihow"