Jump to content

Topic on Project:Support desk

rebuildall.php fails with errors

5
Summary by AhmadF.Cheema

Need to run PHP scripts through a PHP executable. Shell users may be assigned a different PHP version than the one for the website.

Johnywhy (talkcontribs)

mediawiki 1.3, php 7.1 fast cgi

Executing mediawiki rebuildall.php with winscp

https://image.ibb.co/iJTAuG/Screenshot_3.jpg

returns errors:

Command '"./rebuildall.php"'

failed with return code 2 and error message

./rebuildall.php: line 1: ?php: No such file or directory

./rebuildall.php: line 2: /CmdTool.log: Permission denied

./rebuildall.php: line 3: 7zip.inc: command not found

./rebuildall.php: line 4: 7zip.inc: command not found

./rebuildall.php: line 5: 7zip.inc: command not found

./rebuildall.php: line 6: 7zip.inc: command not found

./rebuildall.php: line 6: you: command not found

./rebuildall.php: line 7: 7zip.inc: command not found

./rebuildall.php: line 8: 7zip.inc: command not found

./rebuildall.php: line 8: either: command not found

./rebuildall.php: line 9: syntax error near unexpected token `at'

./rebuildall.php: line 9: ` * (at your option) any later version.'.

2001:16B8:1041:9E00:8D13:68EF:DE48:FAB9 (talkcontribs)

You need to make sure that you are executing he file with the PHP executable. The normal way of doing this is from the shell, e.g. php rebuildall.php.

This post was hidden by 星耀晨曦 (history)
Johnywhy (talkcontribs)

Executing php rebuildall.php at terminal, i'm getting:

"Error: Missing one or more required components of PHP. You are missing a required extension to PHP that MediaWiki needs. Please install: * fileinfo <https://secure.php.net/fileinfo>"

However, my wiki root folder, https://www.MyWikiUrl/phpinfo.php returns:

[fileinfo]

fileinfo support enabled
version 1.0.5
libmagic 522

(MyWikiUrl above linked to my actual wiki)

Is it possible fileinfo is enabled in the wiki root folder, but not the maintenance folder?

Johnywhy (talkcontribs)