Topic on Extension talk:SyntaxHighlight

Windows (XAMPP), fwrite(): Write of 17 bytes failed with errno=22 Invalid argument in [...]\\includes\\shell\\Command.php

3
Escalatr (talkcontribs)

According to the extension´s documentation, it should run on Windows, can anyone confirm that?

Apache Error.log message: fwrite(): Write of 17 bytes failed with errno=22 Invalid argument in C:\\xampp\\htdocs\\wiki\\includes\\shell\\Command.php

(Unfortunately, I get no other messages even with more debug options on)

  • MediaWiki: 1.35.3
  • Windows 10 64bit
  • Python 3.11 and Pygments package installed

There are several hack suggestions in the talk pages: Topic:Vibz8ak3wnpu9mv8, Topic:V4n3pjg78pvmh12n (no temp out files created), Topic:Ugtwpe4lyuly6q98. None of them helped me so far.

I also found this entry: https://phabricator.wikimedia.org/T199989

After editing Command.php with the proposed patch (https://gerrit.wikimedia.org/r/c/mediawiki/core/+/762736/4/includes/shell/Command.php), the extension works. However, I would prefer a proper solution without hacking the MediaWiki core.

Tystnaden (talkcontribs)

I suggest that you upgrade to MediaWiki 1.39.X, which is the current LTS release. Note that MediaWiki 1.35 is going EOL in September 2023. See https://phabricator.wikimedia.org/T199989 for the details about this issue.

Escalatr (talkcontribs)

An update to MW 1.39 ist definitely planned, my understanding: the issue is solved there with Shellbox.

However, the installation does not look trivial to me... Does it run on Windows?

In my case, the whole idea of the Windows version is to offer a ready-to-run package for colleagues without direct access to our original Wiki (which runs on Linux).

Reply to "Windows (XAMPP), fwrite(): Write of 17 bytes failed with errno=22 Invalid argument in [...]\\includes\\shell\\Command.php"