Page MenuHomePhabricator

Fix for T184043 keeps some people from using maintenance scripts
Open, Needs TriagePublic


From the support desk:

My webhoster is Strato. I use putty for the ssh access.
Up to Mediawiki 1.30 it is no problem to run php-scripts like runJobs.php from the command line with ssh/putty. Starting with Mediawiki 1.31 I get the error message "This script must be run from the command line".

The user then identifies the changes made to fix T184043: MediaWiki should treat phpdbg as cli, reverts that, and his problem is resolved.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 5 2019, 4:29 PM

Change 482510 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/Scribunto@master] Revert "Treat phpdbg as being run from the command-line"

Change 482510 abandoned by Zoranzoki21:
Revert "Treat phpdbg as being run from the command-line"

Zoranzoki21 edited subscribers, added: Zoranzoki21; removed: gerritbot.

The check was actually introduced in T111441 / 659f3779c33748ac66fb307e639648d839580130. Later in T184043 / 251a0b97e5bb8711bac1784e90f9b7d61377e7da phpdbg was added to the list of available SAPIs.

On the support desk, the user said that running php gives them the cgi-fcgi SAPI. After a bit of searching I found (same hosting provider) in which it was recommended to use php-cli and/or contact the provider for support.

I don't see much that we can do here, given that the old check was problematic and wrong, and it's really the hosting provider that's messed up here. We can and should improve the error message to include the current SAPI that's being used, and maybe a suggestion to use php-cli as well.