Installation Guidance
Step 1 — Upload Module Files
Extract the package and upload the php_encryptor folder to your WHMCS addons directory:
<whmcs_root>/
└── modules/
└── addons/
└── php_encryptor/
├── php_encryptor.php ← Main module file
├── lib/
│ └── Encryptor.php ← Core encryption engine
├── templates/
│ └── clienthome.tpl ← Admin UI template (Smarty)
├── uploads/ ← Temporary upload storage (auto-created)
└── downloads/ ← Encrypted output storage (auto-created)
Step 2 — Set File Permissions
Ensure your web server can read the module files and has write access to the uploads/ and downloads/ directories:
chmod -R 755 /path/to/whmcs/modules/addons/php_encryptor/
chmod -R 775 /path/to/whmcs/modules/addons/php_encryptor/uploads/
chmod -R 775 /path/to/whmcs/modules/addons/php_encryptor/downloads/
Note: The uploads/ and downloads/ directories are automatically created when the module is first activated. If they don’t exist yet, the module will create them with 0755 permissions.
Step 3 — Verify PHP Extension Requirements
The module requires the following PHP extensions to be installed and enabled on your server:
|
Extension |
Purpose |
|
openssl |
AES-256-CBC encryption of PHP source files |
|
zip |
Packing/unpacking ZIP archives for batch processing |
To verify, run:
php -m | grep -E "openssl|zip"
If any extension is missing, the module will display a clear alert in the admin panel identifying which extensions need to be enabled.
Step 4 — Activate the Module
- Navigate to System Settings → Addon Modules in your WHMCS Admin Panel.
- Locate “PHP Encryptor” and click Activate.
- Click Configure and complete the following:
- License Key: Enter the license key provided with your purchase.
- Encryption Key: Enter a secure 32-character key that will be used for AES-256 encryption. Keep this key safe — it is required to decrypt your files and cannot be recovered if lost.
- Access Control: Select which administrator roles should have access to the module.
- Click Save Changes.
Step 5 — Encrypt Your PHP Files
- Access the module from Addons → PHP Encryptor in the top navigation.
- On the Encrypt tab:
- Drag and drop a .php file or a .zip archive containing multiple PHP files into the upload area (or click to browse).
- (Optional) Switch to the Settings tab to add a custom header (e.g., copyright notice or license terms) that will be prepended to every encrypted file.
- Click Encrypt & Download.
- The encrypted output will automatically download as a ZIP archive (e.g., zip).
Step 6 — Distribute Encrypted Files
The encrypted ZIP archive is ready for distribution to your customers. Each PHP file inside has been transformed into a self-decrypting script that: - Decrypts the original code at runtime using OpenSSL. - Executes the decrypted code via eval(). - Includes your custom header/copyright text if configured.
Important: Your customers’ servers must have the openssl PHP extension enabled to execute encrypted files. Include this requirement in your product documentation.
