Installation & Setup
This guide will help you install ShieldCipher and set up your first protected application.
System Requirements
Before installing ShieldCipher, ensure your system meets these requirements:
- PHP Version: PHP 7.4 or higher (PHP 8.0+ recommended)
- Operating System: Linux, macOS, or Windows
- Required Extensions:
- OpenSSL (for encryption operations)
- JSON (for API communication)
- cURL (for HTTP requests)
- Memory: Minimum 128MB PHP memory limit
- Disk Space: At least 100MB free space for extension and temporary files
Note: For optimal performance, we recommend PHP 8.1+ with OPcache enabled.
Installing MemoryShield Extension
The MemoryShield PHP extension is required to execute protected code. Follow these steps to install it:
Linux Installation
Download the appropriate extension for your PHP version:
# Download MemoryShield extension
wget https://loaders.shieldcipher.com/memoryshield_linux_php81.so
# Copy to PHP extension directory
sudo cp memoryshield_linux_php81.so $(php-config --extension-dir)/memoryshield.so
# Update php.ini
echo "extension=memoryshield.so" | sudo tee -a $(php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||")
# Verify installation
php -m | grep memoryshield
macOS Installation
# Download MemoryShield extension
curl -O https://loaders.shieldcipher.com/memoryshield_macos_php81.so
# Copy to PHP extension directory
sudo cp memoryshield_macos_php81.so $(php-config --extension-dir)/memoryshield.so
# Update php.ini
echo "extension=memoryshield.so" | sudo tee -a $(php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||")
# Restart PHP-FPM (if applicable)
brew services restart php
Windows Installation
# Download MemoryShield extension
# Visit https://loaders.shieldcipher.com/ and download memoryshield_windows_php81.dll
# Copy to PHP extension directory (usually C:\php\ext\)
copy memoryshield_windows_php81.dll C:\php\ext\memoryshield.dll
# Edit php.ini and add:
extension=memoryshield.dll
# Restart your web server
Verification: After installation, verify the extension is loaded by running
php -m | grep memoryshield or check phpinfo() output.
Creating API Keys
API keys allow programmatic access to ShieldCipher services. Create them in your customer portal:
- Log in to app.shieldcipher.com
- Navigate to Settings → API Keys
- Click Create New API Key
- Give your key a descriptive name (e.g., "Production Server", "CI/CD Pipeline")
- Select the appropriate scopes:
packages:read- View packagespackages:write- Upload and manage packageslicenses:read- View licenseslicenses:write- Create and manage licenses
- Copy the API key and secret immediately (they won't be shown again)
Security: Store API keys securely. Never commit them to version control. Use environment variables or secure key management systems.
Uploading Your First Package
Now that everything is set up, let's protect your first PHP application:
Step 1: Prepare Your Code
Create a ZIP file containing your PHP application files. Ensure:
- All PHP files are included
- An
installer.phpfile is present (required for activation) - No sensitive files (config files with passwords, etc.) are included
- The ZIP file is under 100MB (for trial accounts)
Step 2: Upload via Portal
- Go to Packages in your customer portal
- Click Upload New Package
- Select your product (or create a new one)
- Enter a package name and version
- Upload your ZIP file
- Click Upload
Step 3: Lock Package
After upload, you need to lock the package with encryption:
- Click on your uploaded package
- Click Lock Package
- Optionally set a passphrase (for additional security)
- Click Lock
Step 4: Encode Package
Once locked, encode the package:
- Select a protection profile:
- Basic: Standard protection for most applications
- Standard: Enhanced protection with additional security layers
- Advanced: Maximum protection for sensitive applications
- Click Encode
- Wait for encoding to complete (usually 1-5 minutes)
Step 5: Download Protected Version
Once encoding is complete:
- Click Download on your encoded package
- Extract the ZIP file
- Deploy to your server
- Ensure MemoryShield extension is installed
- Run your application
Next Steps
Now that you've protected your first package:
- Learn about license management
- Set up CI/CD integration
- Configure API access for automation