Topic on Project:Support desk

Cannot get shell maintenance commands to work

10
A01020304a (talkcontribs)

I entered shell and when use php update.php command

-bash: maintenance: command not found

(uiserver):u101519602:~/igoaddons.eu.org$ cd maintenance

(uiserver):u101519602:~/igoaddons.eu.org/maintenance$ php7.1 update.php

X-Powered-By: PHP/7.1.33

Content-type: text/html; charset=UTF-8

This script must be run from the command line(uiserver):u101519602:~/igoaddons.eu.org/maintenance$ php7.1 php update.php

Status: 404 Not Found

X-Powered-By: PHP/7.1.33

Content-type: text/html; charset=UTF-8

No input file specified.

(uiserver):u101519602:~/igoaddons.eu.org/maintenance$

TiltedCerebellum (talkcontribs)
A01020304a (talkcontribs)

If I do php7.1 update.php from base directory (the one that has localsettings i get this

This script must be run from the command line(uiserver):u101519602:~/igoaddons.eu.org$ php7.1 update.php

Status: 404 Not Found

X-Powered-By: PHP/7.1.33

Content-type: text/html; charset=UTF-8

No input file specified.


If I do php7.1 update.php from maintenance folder i get this

(uiserver):u101519602:~/igoaddons.eu.org/maintenance$ This script must be run from the command line(uiserver):u101519602:~/igoaddons.eu.org$ php7.1 update.php

-bash: syntax error near unexpected token `('

(uiserver):u101519602:~/igoaddons.eu.org/maintenance$ Status: 404 Not Found

-bash: Status:: command not found

(uiserver):u101519602:~/igoaddons.eu.org/maintenance$ X-Powered-By: PHP/7.1.33

-bash: X-Powered-By:: command not found

(uiserver):u101519602:~/igoaddons.eu.org/maintenance$ Content-type: text/html; charset=UTF-8

-bash: Content-type:: command not found

(uiserver):u101519602:~/igoaddons.eu.org/maintenance$

(uiserver):u101519602:~/igoaddons.eu.org/maintenance$ No input file specified.

-bash: No: command not found

(uiserver):u101519602:~/igoaddons.eu.org/maintenance$


(uiserver):u101519602:~/igoaddons.eu.org/maintenance$ $ php update.php

-bash: $: command not found


if i do php update.php shell defaults back to php4 and i get this

(uiserver):u101519602:~/igoaddons.eu.org/maintenance$ php update.php

X-Powered-By: PHP/4.4.9

Content-type: text/html

<br />

<b>Parse error</b>:  syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in <b>/homepages/17/d835070261/htdocs/igoaddons.eu.org/maintenance/update.php</b> on line <b>30</b><br />

(uiserver):u101519602:~/igoaddons.eu.org/maintenance$

TiltedCerebellum (talkcontribs)

The folks here will probably want to know what version of Mediawiki, php, sql etc. I can't visit the site's Special:Version page to look, I get redirected to something else for some reason. Looks like it's a shoutwiki, you might want to contact the shoutwiki people.

Is php 7.1 compatible with the version of MediaWiki you are using? https://www.mediawiki.org/wiki/Compatibility#PHP

A01020304a (talkcontribs)

its my own wiki which is a work in progress, its nothing to do with shout wiki, that text was just added as a filler rather than what it is.

http://igoaddons.eu.org/index.php?title=Special:Version

Product Version
MediaWiki 1.31.0-rc.0
PHP 7.3.22 (cgi-fcgi)
MySQL 5.7.30-log
ICU 63.1
Lua 5.1.5

I tried version 1.35 but my database hated that and would not load anything so after trial and error this wiki version works. all pages load apart from extensions which i cannot install as need composer. cannot seem to inatall semanticmaps or semanticwiki as need composer and nothing works

MarkAHershberger (talkcontribs)

In this comment you say you ran update.php, but the output you pasted seems to indicate that you pasted a few wrong things into the command line before correctly using the php update.php.

But that invokes php 4(!!!) which is ancient and will not work.

Try using the command php7.3 update.php in order to invoke the 7.3 version on the command line which matches the version that your website is using.

A01020304a (talkcontribs)

neither works


(uiserver):u101519602:~/igoaddons.eu.org$ php7.3 update.php

Status: 404 Not Found

X-Powered-By: PHP/7.3.22

Content-type: text/html; charset=UTF-8

No input file specified.

(uiserver):u101519602:~/igoaddons.eu.org$ cd maintenance

(uiserver):u101519602:~/igoaddons.eu.org/maintenance$ php7.3 update.php

X-Powered-By: PHP/7.3.22

Content-type: text/html; charset=UTF-8

This script must be run from the command line(uiserver):u101519602:~/igoaddons.eu.org/maintenance$

Bawolff (talkcontribs)

it sounds like you are using the php-cgi executable instead of the php-cli executable. your system may have php-cli installed under a different name or you may have to ask your system administrator to install it.

A01020304a (talkcontribs)

seems the command had to be

/usr/bin/php7.3-cli igoaddons.eu.org/maintenance/update.php


would never have guessed that solution

2.57.131.128 (talkcontribs)

thank you very much for find out

Reply to "Cannot get shell maintenance commands to work"