Problem
When attempting to create a backup or export CSV files, the task may fail with the error:
“Error: cannot pack”
This solution also applies to the following errors:
-
“Error during export!”
-
“Can’t unpack package”
Solution
The issue is typically caused by PHP’s sys_temp_dir
not being set or not writable.
How to Check sys_temp_dir
:
-
Go to Admin → Settings → System
-
Click PHP Info (top-left of the page)
-
Search for
sys_temp_dir
-
If a value is present:
Ensure the directory exists and is writable by the server. -
If no value is set:
You need to define one manually in your PHP configuration.
How to Set or Fix It:
-
Edit your
php.ini
file and add: -
Make sure the specified folder:
-
Exists
-
Has proper permissions (e.g.,
755
) -
Is writable by the PHP process
-
If you’re unsure how to do this, contact your hosting support for help or guidance.
Where to Find the Files Manually
Even if the compression fails, the raw files are still generated:
-
Backups (not compressed):
Located in:admin/system/backup/
-
CSV Exports (not compressed):
Located in:admin/system/data/