getgrav/grav · error · InvalidArgumentException
ZipArchiver: {source} cannot be found...
Error message
ZipArchiver: {source} cannot be found... What it means
Error "ZipArchiver: {source} cannot be found..." thrown in getgrav/grav.
Source
Thrown at system/src/Grav/Common/Filesystem/ZipArchiver.php:278
throw new RuntimeException($message);
}
/**
* @param string $source
* @param callable|null $status
* @return $this
*/
public function compress($source, ?callable $status = null)
{
if (!extension_loaded('zip')) {
throw new InvalidArgumentException('ZipArchiver: Zip PHP module not installed...');
}
// Get real path for our folder
$rootPath = realpath($source);
if (!$rootPath) {
throw new InvalidArgumentException('ZipArchiver: ' . $source . ' cannot be found...');
}
$zip = new ZipArchive();
$result = $zip->open($this->archive_file, ZipArchive::CREATE);
if ($result !== true) {
$error = 'unknown error';
if ($result === ZipArchive::ER_NOENT) {
$error = 'file does not exist';
} elseif ($result === ZipArchive::ER_EXISTS) {
$error = 'file already exists';
} elseif ($result === ZipArchive::ER_OPEN) {
$error = 'cannot open file';
} elseif ($result === ZipArchive::ER_READ) {
$error = 'read error';
} elseif ($result === ZipArchive::ER_SEEK) {
$error = 'seek error';
}
throw new InvalidArgumentException('ZipArchiver: ' . $this->archive_file . ' cannot be created: ' . $error);View on GitHub (pinned to 6040efed04)
When it happens
Trigger: Thrown at system/src/Grav/Common/Filesystem/ZipArchiver.php:278 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of getgrav/grav@6040efed04 (2026-08-17).
Data as JSON: /api/errors/6c57eaacb68dea9e.
Report an issue: GitHub.