EN TR ES

NativeLoad Secure Runtime — Guide for Panel Vendors

For control-panel vendors: teams that *build* hosting panels (cPanel, Plesk, CWP, DirectAdmin, CyberPanel, aaPanel — or a custom panel like contPanel) and want to ship the runtime built-in and auto-installed, the way panels ship a standard loader. If you *operate* hosting, read HOSTING-PROVIDERS instead. Also in Türkçe · Español.

1. What you integrate

The NativeLoad Secure Runtime is a compiled PHP extension that runs NativeLoad-protected applications. Your users protect their source; those files run where the runtime is installed. Shipping it as a one-click/automatic feature makes your panel "protected-PHP ready."

The integration is two small, scriptable surfaces — there is no key or license step:

SurfaceFilePurpose
Detectep-detect.shmachine-readable status (JSON)
Installinstall.sh / contpanel-hook.shfetch + enable, idempotent

Everything is non-interactive with clear exit codes; drive it from PHP, Go, Python or shell.


2. Ship the package

Bundle the package (src/, bin/, docs/) inside your panel, e.g. /usr/local/<panel>/addons/eploader/, keep scripts executable (chmod +x src/*.sh), and pull updates from https://encoderphp.com/loader/eploader.zip (and the prebuilt engines under .../loader/bin/).


3. Detect, then install

php src/ep-detect.sh
# {"installed":true,"active":true,"version":"2.0.0","ext_dir":"...","so":true,"php":"8.3"}
$st = json_decode(shell_exec('php /…/eploader/src/ep-detect.sh'), true);
if     (!empty($st['active'])) $state = 'active';     // ready
elseif (!empty($st['so']))     $state = 'restart';    // installed, needs FPM restart
else                           $state = 'absent';     // offer install

Install (auto: detect → install if absent), once per PHP version:

./src/contpanel-hook.sh                                   # detect + install
# or pin a PHP version:
PHP_BIN=/opt/<panel>/php/8.2/bin/php \
PHPIZE=/opt/<panel>/php/8.2/bin/phpize \
PHPCONFIG=/opt/<panel>/php/8.2/bin/php-config \
./src/install.sh

If a user installed by hand, detection reports it and auto-install will not install twice (EP_FORCE=1 to override). After install, restart the PHP SAPI.


4. Suggested panel UX

  • A per-server "Protected PHP" toggle → detect, then install.
  • A status badge from ep-detect.sh (active / needs restart / off).
  • A "Rebuild for new PHP version" action → re-run install with new PHP paths.
  • Surface the runtime version from detect to prompt updates.

There is no per-account key UI — once the runtime is installed, protected applications run; nothing to provision per customer.


5. Multi-PHP & fleet

Loop install over each PHP version (PHP_BIN/PHPIZE/PHPCONFIG). For bulk nodes, wrap the one-command in your orchestration (Ansible example in HOSTING-PROVIDERS); it is idempotent via creates: on the .so.


6. Reference — scripts

  • ep-detect.sh → one JSON line; exit 0. Honors PHP_BIN.
  • install.sh → fetch/build + enable; honors EP_SO (prebuilt), EP_FORCE,

PHP_BIN/PHPIZE/PHPCONFIG. Exit 0 on success or already-installed.

  • contpanel-hook.sh → [no args] detect+install · --status JSON.
  • get.sh → one-command bootstrap; downloads the matching prebuilt engine.

Contact: integration support and co-marketing at [email protected].