MediaWiki installation "Error downloading archive"

I’m trying to install MediaWIki and getting this error:

I’ve previously had no problems installing other apps on other domains.

Checking the error log for the domain I see a lot of:

[Thu Feb 06 02:29:22.015866 2025] [proxy_fcgi:error] [pid 820058:tid 820093] [client 3.232.102.111:0] AH01071: Got error 'Primary script unknown'
[Thu Feb 06 02:29:22.990805 2025] [proxy_fcgi:error] [pid 820057:tid 820060] [client 98.83.8.142:0] AH01071: Got error 'Primary script unknown'
[Thu Feb 06 02:29:24.081406 2025] [proxy_fcgi:error] [pid 820058:tid 820073] [client 54.84.161.62:0] AH01071: Got error 'Primary script unknown'
[Thu Feb 06 02:29:24.468823 2025] [proxy_fcgi:error] [pid 820058:tid 820081] [client 52.45.15.233:0] AH01071: Got error 'Primary script unknown'
[Thu Feb 06 02:29:25.744506 2025] [proxy_fcgi:error] [pid 820057:tid 820118] [client 54.197.102.71:0] AH01071: Got error 'Primary script unknown'
[Thu Feb 06 02:29:27.041636 2025] [proxy_fcgi:error] [pid 820058:tid 820098] [client 100.25.120.246:0] AH01071: Got error 'Primary script unknown'

this is what the error log looks like after I tried installing, though I am migrating, so some activity here could be people trying to reach the site.

I also notice that a Database is created, though it is empty.

I’m running on Debian 12. I tailed journalctl as well while executing but I couldn’t see anything that looks important, but I’m not sure what I’m looking for. There’s nothing in the syslog that matches up, just CRON[941861]: (hestiaweb) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart)

I checked the code in /usr/local/heatia/web/src/app/WebApp/Installers/Mediawiki/MediaWikiSetup.php and verified that the source for the archive is correct “https://releases.wikimedia.org/mediawiki/1.42/mediawiki-1.42.3.zip”.

Sorry, had to reply because I couldn’t add a new screenshot:

Whilst trying to debug this, I edited /usr/local/hestia/web/src/app/System/HestiaApp.php and changed line 272 from:

if ($return_var !== 0) {
			return false;
		}

to

if ($return_var !== 0) {
			throw new /Exception("Error: " . implode(",", $output));
		}

so that I could see the errors being generated:

sudo chmod 777 /tmp/hestia-webapp

allowed the installer to continue, but then I get an error that the MediaWiki install.php script failed with errors.

1 Like

could you check the permission set of /tmp/hestia-webapp? Maybe its set to root:root

Sorry, I was in the middle of editing the post, I checked that and it worked. But now there’s errors in the MediaWiki install.php.

I’m guessing I’ve got incorrect folder permissions happening, but I don’t know much about what they should be.

The error now after changing the tmp folder permissions is:

I can see the downloaded zip has been unzipped into public_html

public_html and maintenance directories have permissions: drwxr-x--x

the install.php has permissions set as -rw-r--r--

journalctl has the following:

Feb 06 21:52:54 ************.vps.com sudo[1107311]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-sys-config json
Feb 06 21:52:54 ************.vps.com sudo[1107311]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:52:54 ************.vps.com sudo[1107311]: pam_unix(sudo:session): session closed for user root
Feb 06 21:52:54 ************.vps.com sudo[1107324]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-user ***** json
Feb 06 21:52:54 ************.vps.com sudo[1107324]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:52:54 ************.vps.com sudo[1107324]: pam_unix(sudo:session): session closed for user root
Feb 06 21:52:54 ************.vps.com sudo[1107343]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-web-domain ***** ************.com json
Feb 06 21:52:54 ************.vps.com sudo[1107343]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:52:55 ************.vps.com sudo[1107343]: pam_unix(sudo:session): session closed for user root
Feb 06 21:52:55 ************.vps.com sudo[1107360]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-sys-php json
Feb 06 21:52:55 ************.vps.com sudo[1107360]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:52:55 ************.vps.com sudo[1107360]: pam_unix(sudo:session): session closed for user root
Feb 06 21:52:55 ************.vps.com sudo[1107378]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-web-domain ***** ************.com json
Feb 06 21:52:55 ************.vps.com sudo[1107378]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:52:55 ************.vps.com sudo[1107378]: pam_unix(sudo:session): session closed for user root
Feb 06 21:52:55 ************.vps.com sudo[1107395]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-user ***** json
Feb 06 21:52:55 ************.vps.com sudo[1107395]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:52:55 ************.vps.com sudo[1107395]: pam_unix(sudo:session): session closed for user root
Feb 06 21:52:55 ************.vps.com sudo[1107414]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-add-database ***** 47954 47954 /tmp/hstHlvRMn mysql localhost utf8mb4
Feb 06 21:52:55 ************.vps.com sudo[1107414]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:52:55 ************.vps.com sudo[1107414]: pam_unix(sudo:session): session closed for user root
Feb 06 21:52:55 ************.vps.com sudo[1107570]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-delete-fs-file ***** /home/*****/web/************.com/public_html/robots.txt
Feb 06 21:52:55 ************.vps.com sudo[1107570]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:52:55 ************.vps.com sudo[1107570]: pam_unix(sudo:session): session closed for user root
Feb 06 21:52:55 ************.vps.com sudo[1107595]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-delete-fs-file ***** /home/*****/web/************.com/public_html/index.html
Feb 06 21:52:55 ************.vps.com sudo[1107595]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:52:55 ************.vps.com sudo[1107595]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:06 ************.vps.com sudo[1107622]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-extract-fs-archive ***** /tmp/hestia-webapp/mediawiki-1.42.3.zip /home/*****/web/************.com/public_html/tmp-mediawiki  1
Feb 06 21:53:06 ************.vps.com sudo[1107622]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:12 ************.vps.com sudo[1107622]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:12 ************.vps.com sudo[1107686]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-change-web-domain-tpl ***** ************.com default
Feb 06 21:53:12 ************.vps.com sudo[1107686]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:12 ************.vps.com systemd[1]: Reloading apache2.service - The Apache HTTP Server...
Feb 06 21:53:12 ************.vps.com apachectl[1107781]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using ************.vps.com. Set the 'ServerName' directive globally to suppress this message
Feb 06 21:53:12 ************.vps.com systemd[1]: Reloaded apache2.service - The Apache HTTP Server.
Feb 06 21:53:13 ************.vps.com sudo[1107686]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:13 ************.vps.com sudo[1107940]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-sys-php json
Feb 06 21:53:13 ************.vps.com sudo[1107940]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:13 ************.vps.com sudo[1107940]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:13 ************.vps.com sudo[1107958]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-change-web-domain-backend-tpl ***** ************.com PHP-8_2
Feb 06 21:53:13 ************.vps.com sudo[1107958]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:13 ************.vps.com systemd[1]: Reloading apache2.service - The Apache HTTP Server...
Feb 06 21:53:13 ************.vps.com apachectl[1108111]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using ************.vps.com. Set the 'ServerName' directive globally to suppress this message
Feb 06 21:53:13 ************.vps.com systemd[1]: Reloaded apache2.service - The Apache HTTP Server.
Feb 06 21:53:13 ************.vps.com systemd[1]: Reloading php8.2-fpm.service - The PHP 8.2 FastCGI Process Manager...
Feb 06 21:53:13 ************.vps.com systemd[1]: Reloaded php8.2-fpm.service - The PHP 8.2 FastCGI Process Manager.
Feb 06 21:53:13 ************.vps.com sudo[1107958]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:13 ************.vps.com sudo[1108322]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-web-domain ***** ************.com json
Feb 06 21:53:13 ************.vps.com sudo[1108322]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:14 ************.vps.com sudo[1108322]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:14 ************.vps.com sudo[1108339]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-copy-fs-directory ***** /home/*****/web/************.com/public_html/tmp-mediawiki/mediawiki-1.42.3/. /home/*****/web/************.com/public_html/
Feb 06 21:53:14 ************.vps.com sudo[1108339]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:16 ************.vps.com sudo[1108339]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:16 ************.vps.com sudo[1108369]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-run-cli-cmd ***** /usr/bin/php8.2 \'/home/*****/web/************.com/public_html/maintenance/install.php\' --dbserver=\'localhost\' --dbname=\'*****_47954\' --installdbuser=\'*****_47954\' --installdbpass=\'2ddaa84e21886111e33b\' --dbuser=\'*****_47954\' --dbpass=\'2ddaa84e21886111e33b\' --server=\'https://************.com\' --scriptpath= --lang=\'en\' --pass=\'Tyr@nt103cunt1mediawiki\' MediaWiki \'admin\'
Feb 06 21:53:16 ************.vps.com sudo[1108369]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:16 ************.vps.com runuser[1108382]: pam_unix(runuser:session): session opened for user *****(uid=1003) by (uid=0)
Feb 06 21:53:16 ************.vps.com runuser[1108382]: pam_unix(runuser:session): session closed for user *****
Feb 06 21:53:16 ************.vps.com sudo[1108369]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:16 ************.vps.com sudo[1108387]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-sys-config json
Feb 06 21:53:16 ************.vps.com sudo[1108387]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:16 ************.vps.com sudo[1108387]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:16 ************.vps.com sudo[1108400]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-user ***** json
Feb 06 21:53:16 ************.vps.com sudo[1108400]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:16 ************.vps.com sudo[1108400]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:16 ************.vps.com sudo[1108419]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-web-domain ***** ************.com json
Feb 06 21:53:16 ************.vps.com sudo[1108419]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:17 ************.vps.com sudo[1108419]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:17 ************.vps.com sudo[1108436]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-sys-php json
Feb 06 21:53:17 ************.vps.com sudo[1108436]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:17 ************.vps.com sudo[1108436]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:17 ************.vps.com sudo[1108454]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-web-domain ***** ************.com json
Feb 06 21:53:17 ************.vps.com sudo[1108454]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:17 ************.vps.com sudo[1108454]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:17 ************.vps.com sudo[1108471]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-user ***** json
Feb 06 21:53:17 ************.vps.com sudo[1108471]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:17 ************.vps.com sudo[1108471]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:17 ************.vps.com sudo[1108490]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-web-domain ***** ************.com json
Feb 06 21:53:17 ************.vps.com sudo[1108490]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:17 ************.vps.com sudo[1108490]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:17 ************.vps.com sudo[1108507]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-sys-php json
Feb 06 21:53:17 ************.vps.com sudo[1108507]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:17 ************.vps.com sudo[1108507]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:17 ************.vps.com sudo[1108525]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-database-hosts json
Feb 06 21:53:17 ************.vps.com sudo[1108525]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:17 ************.vps.com sudo[1108525]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:17 ************.vps.com sudo[1108543]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-run-cli-cmd ***** ls /home/*****/web/************.com/public_html/
Feb 06 21:53:17 ************.vps.com sudo[1108543]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:17 ************.vps.com runuser[1108556]: pam_unix(runuser:session): session opened for user *****(uid=1003) by (uid=0)
Feb 06 21:53:17 ************.vps.com runuser[1108556]: pam_unix(runuser:session): session closed for user *****
Feb 06 21:53:17 ************.vps.com sudo[1108543]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:17 ************.vps.com sudo[1108561]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-web-domain ***** ************.com json
Feb 06 21:53:17 ************.vps.com sudo[1108561]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:17 ************.vps.com sudo[1108561]: pam_unix(sudo:session): session closed for user root
Feb 06 21:53:17 ************.vps.com sudo[1108578]: hestiaweb : PWD=/usr/local/hestia/web/add/webapp ; USER=root ; COMMAND=/usr/local/hestia/bin/v-list-database-hosts json
Feb 06 21:53:17 ************.vps.com sudo[1108578]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
Feb 06 21:53:17 ************.vps.com sudo[1108578]: pam_unix(sudo:session): session closed for user root
Feb 06 21:54:01 ************.vps.com CRON[1108595]: pam_unix(cron:session): session opened for user hestiaweb(uid=1004) by (uid=0)
Feb 06 21:54:01 ************.vps.com CRON[1108596]: (hestiaweb) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart)

I can see the v-run-cli-cmd which I think is the bash script executing install.php.

The nginx-error.log in /usr/local/hestia/log has the following:

big cli command  | Could not open input file: '/home/*****/web/************.com/public_html/maintenance/install.php'

which again makes me think it’s a permissions issue? But I’ve checked the install.php again and it definitely is set to 644 so there shouldn’t be any problems reading it.

Googling tells me that “Could not open input file” is often a case of windows line endings. I’ve used dos2unix on both the v-run-cli-cmd script and install.php but the file sizes didn’t change so it wasn’t that.

I’ve solved my problem, but in a roundabout way. I don’t think it would work for anyone else.

The files are put into public_html though the install.php fails. To my knowledge, the install.php is only creating a database and configuring the initial LocalSettings.php files.

Because I was migrating, I didn’t actually need the install.php to run. The DB was created so I could just hook everything up and import the exported DB from the previous installation etc.

Maybe for someone else, you could run the install.php manually, but I’m not sure about which user to do it with.

As an aside, MediaWiki is currently on version 1.43. It’s easy enough to edit /usr/local/hestia/web/src/app/WebApp/Installers/MediaWiki/MediaWikiSetup.php to use the newer version. I had to do this because my old wiki was 1.43 and you can’t downgrade during the migration.

We are rewriting the quick installer system at the moment

2 Likes

I’ve now had similar issues with the install scripts failing in the command line for both Opencart and Prestashop.

Not sure what I can do on my end to get these to work? I get kind of grab the command from the logs and manually run it, but I’m uncertain if it matters what user I run it as.

many thanks for this. i was experimenting with NamelessMC and had the same issue. changed the permissions on the /tmp/hestia-webapp folder and i’m now up and running :slight_smile:

What do the permissions need to be?

just remove the folder, it will be recreated with the right permission set. Issue will be fixed in 1.9.3.

1 Like

Is there a CMD line to run? Or does Hestia recreate it via a cronjob?
Edit: sorry just realised it was a tmp. Will try and see if it resolved my issue

Yeah, deleted tmp/hestia-webapp but the install scripts are still giving the same error.

tmp/hestia-webapp was recreated and has the following permissions:

drwxr-xr-x 2 hestiaweb hestiaweb

I gave the folder 777 permissions before attempting an install and still get the same error about not being able to open the input file.

This issue seems to be fixed for me by removing /tmp/hestia-webapp as suggested earlier. Permissions for the folder:

Before:
drwxr-xr-x 2 admin admin

After:
drwxr-xr-x 2 hestiaweb hestiaweb

I don’t know how the old folder got assigned to admin though I do recall seeing in the patch notes that hestiaweb was a newly added user so maybe the old folder was correct for earlier versions of Hestia.

1 Like