Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

freekmurze's avatar

ZipArchive not found in PHP 7 Forge servers

Newly provisioned Forge server do not seem to have ZipArchive installed.

new ZipArchive(); //results in class not found error.

Anybody have clear instruction on how to install this?

0 likes
7 replies
bobbybouwmann's avatar

I think you are referring to your own spatie/laravel-backup package right? I have been using this package without problems on a forge server with PHP 7 running ;)

freekmurze's avatar
freekmurze
OP
Best Answer
Level 13

I think it's a very new problem. ZipArchive is only missing from server I've set up in the last couple of days.

To install it just run this command:

sudo apt-get install php7.0-zip

@bobbybouwmann and it's indeed necessary for the backup package :-) New major version will be released somewhere this week.

4 likes
daylight's avatar

If you are on AMI linux you can install running: sudo yum install php70-zip

dunas's avatar

When I try to do sudo apt-get the server asks for a password, but by default laravel forge allows only ssh key access.

Any ideas?

iotek's avatar

You should get an email with the root password after creating a server in forge.

Please or to participate in this conversation.