Background

By default, if you check data encryption. It should encrypt BOTH database and media files during export. This is how the setting currently looks like:

IMPORTANT: This tutorial only applies before Prime Mover 1.1.5 where it uses ZIP as an archiving format. This is no longer applicable starting Prime Mover 1.1.5 since media encryption/decryption does not depend on LIBZIP library.

However, some servers might only encrypt database and your media file contents does not have encryption. This is because PHP has some specific requirements for this to work.

Make sure your server complies with ALL of the following requirements.

Requirements

  • Your server should use at least PHP 7.2.0
  • Libzip extension should be at least 1.2.0

Troubleshooting Steps

  • [PRO version only] In Prime Mover Pro, login as administrator.
  • [PRO version only] Go to Prime Mover – Advance settings.
  • [PRO version only] Scroll down to the bottom and click Export site info . This will download the debug info of your site to your downloads folder.
  • Open it with a text editor.
  • Go to section phpinfo
  • The PHP version should be at least PHP 7.2.0. If not, please upgrade to this minimum version requirement for media encryption to work.
  • Find the value of Libzip library version, it should be at least 1.2.0. If not, you should contact your server administrator to upgrade libzip to this version.
  • Upload this PHP script to your server to know if setEncryptionName method in Zip archive class. It should output that its found. Otherwise your requisite is lacking and you need to contact your server administrator to fix this.
<?php
$ziparchive = new \ZipArchive();
$methods = get_class_methods($ziparchive);
if (in_array('setEncryptionName', $methods)) {
    echo 'setEncryptionName is FOUND';
} else {
    echo 'setEncryptionName is NOT FOUND';
}

This method is first added in PHP 7.2.0 and its used to encrypt the media files.

Important : Prime Mover handles these checks automatically. So if it founds out your server does not meet this minimum requirement. It will use default setting which is not to encrypt the media files (only database contents are encrypted).

Once your server meets the requirements, you should be able to encrypt media files also.

Was this article helpful?
YesNo