Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New install gives a Zip error #249

Closed
daveschroeter opened this issue Aug 11, 2023 · 4 comments
Closed

New install gives a Zip error #249

daveschroeter opened this issue Aug 11, 2023 · 4 comments
Labels
bug Squash it quick! upstream Not my problem

Comments

@daveschroeter
Copy link

PHP Fatal error: Uncaught ValueError: Invalid or uninitialized Zip object in /my_server/index.php:1825
Stack trace:
#0 /myserver/index.php(1825): ZipArchive->extractTo()
#1 {main}
thrown in /myserver/index.php on line 1825

I am on PHP 8.0 and verified that the zip module is installed. Any ideas?

@daveschroeter
Copy link
Author

Update with further info: I'm on GoDaddy, I've verified the Zip PHP module is installed, and I get the error on PHP 8.0 and 8.1. Could this be a permissions issue?

@sbrl
Copy link
Owner

sbrl commented Oct 11, 2023

Hmmm. Is this shared hosting, or do you have root / sudo / admin / whatever you want to call it permissions over your hosting platform?

Can I also have the name and version of your operating system please? On Linux, run these commands and paste the output:

cat /etc/os-release
ls_release -a
uname -a

I can't reproduce this error, so I'm going to need more information.

Additionally, what version of Pepperminty Wiki are you using and where did you get it from?

@sbrl
Copy link
Owner

sbrl commented Oct 11, 2023

It may be a permissions issue, but I'm not sure. Either way, it's clearly not something I anticipated :P

If you do have admin access over your host, please check the user that your PHP server (or, httpd if you are using Apache) and ensure that you chown index.php and the entire directory it sits in to this user account.

For example, on my server PHP runs as www-data, so I do this:

sudo chown -R www-data:www-data path/to/directory

If this doesn't help and I can't track down the error from the additional info you provide above, I will produce a debug version of index.php for you that I'll ask you to test for me to gather more information.

sbrl added a commit that referenced this issue Oct 11, 2023
@sbrl
Copy link
Owner

sbrl commented Oct 12, 2023

To summarise a Discord chat, the ZipArchive implementation on GoDaddy shared hosting does not work correctly.

Pepperminty Wiki from commit 7698290 and later will now generate a more useful error message. If you get the following text:

Oops! Unfortunately, Pepperminty Wiki wasn't able to unpack itself properly. This is likely either a server misconfiguration or a bug. ZipArchive, the extractor class used by Pepperminty Wiki says: The zip archive was inconsistent.

Please check that the zip extension is installed properly by inspecting the output of php -m, or running the phpinfo() command in a .php file on your webserver.

Therefore, Pepperminty Wiki is unable to unpack the extra data resources it needs to run. Further inspection revealed that the Libzip version was 1.3.2..... and the latest version on Ubuntu 23.04 is 1.7.3, and on libzip.org it's 1.10! Also, 1.3.2 was released on 20th November 2017!

As a workaround, please:

  1. Report the issue to your hosting provider and tell them to update their stuff, 'cause it's very very out of date
  2. Download and extract the following .zip and upload the ._extra_data directory contained within to sit alongside your index.php: extra_data.zip

@sbrl sbrl closed this as completed Oct 12, 2023
@sbrl sbrl added bug Squash it quick! upstream Not my problem labels Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Squash it quick! upstream Not my problem
Projects
None yet
Development

No branches or pull requests

2 participants