Installing the phpcube Loader on Linux
Select your Linux environment below for tailored setup steps to activate the phpcube.so Zend extension in under 60 seconds.
Installation steps
Download into aaPanel Extension Directory
Run this command to download the matching binary directly into your aaPanel extension directory:
EXT_DIR=$(/www/server/php/84/bin/php-config --extension-dir)
curl -fsSL "https://phpcube.maksudur.dev/api/loader.php?php=8.4" -o "$EXT_DIR/phpcube.so"
chmod 755 "$EXT_DIR/phpcube.so"
Add Extension to php.ini
Append the extension line to the PHP configuration file:
echo "extension=phpcube.so" >> /www/server/php/84/etc/php.ini
Or via aaPanel Web UI → App Store → PHP → Configuration file → add extension=phpcube.so at bottom.
Restart PHP Service
Restart the PHP-FPM process to apply the changes:
systemctl restart php-fpm-84
Verifying the Loader
Run either command to confirm the loader is active and ready in your PHP environment:
php -m | grep phpcube
phpcubephp -r "echo extension_loaded('phpcube') ? '✓ phpcube loader is active!' . PHP_EOL : '✗ NOT LOADED' . PHP_EOL;"
License File Placement
When running protected scripts on your server, place the authorized license.lic file in your application root:
/var/www/my-application/
├── app/ # Encrypted PHP files
├── public/ # Web root (index.php, assets)
├── vendor/ # Standard Composer packages
└── license.lic # Signed phpcube cryptographic license file
License Renewal & Auto-Refresh
Monthly and yearly licenses renew without any work on your server, and you never re-encode your files.
Starting 7 days before expiry, the loader downloads your renewed license.lic by itself. It checks at most every 6 hours, or every 5 minutes once the license has expired. You don't need a cron job or a PHP restart.
If a payment is late, protected code keeps running for 7 days after the expiry date. Renew within that window and nobody notices.
A renewal keeps the same product key and domains, and only the expiry changes. Your encoded files keep working as they are.
Requirements
- Outbound HTTPS from the server to the license server,
allow_url_fopen = On, and theopensslextension (all default on aaPanel). - If PHP can write to the folder that holds
license.lic, the file is replaced there. If not, the renewed copy is kept in PHP's temp directory and used automatically. - Licenses issued before this feature get it at their next renewal. To check a license, run
phpcube_license_info()and look forauto_refreshandin_grace.
Check status / turn it off
php -r 'print_r(phpcube_license_info());'
; php.ini - turn off self-refresh (on by default)
phpcube.auto_refresh = 0
Fallback: servers without outbound HTTPS
If the loader can't reach the license server, open the portal and click 🔄 Auto-refresh on a license. It gives you a one-line command that installs a small cron job to fetch the renewed license instead.