CI4 for Perfex CRM By Head Random • 2026-11-26 11:30 AM

How to Install and Configure IgniteCore for Perfex CRM (Admin & DevOps Guide)

295.05 ms

Install IgniteCore for Perfex CRM by uploading the module ZIP through Setup > Modules, verifying PHP 8.2+ and writable directory permissions, and attaching either the managed .htaccess block (Apache/OpenLiteSpeed) or the 3-line index.php marker (Nginx/IIS/CyberPanel). If any prerequisite is missing or an update overwrites entry rules, IgniteCore's 5-Layer Circuit Breaker automatically routes traffic back to stock Perfex CodeIgniter 3 with zero downtime.

Server Prerequisites & Automatic Fallback Matrix

IgniteCore embeds a self-contained, zero-vendor CodeIgniter 4.7.6 runtime inside modules/ignite_core/runtime/ so production servers never require Composer. Before booting CI4, the Pre-Boot Front-Dispatcher checks every prerequisite below and falls back to Perfex CI3 cleanly whenever a condition is unmet.

Requirement Minimum / Recommended Verification Purpose Fallback Behavior If Unmet
Perfex CRM Version 3.0.0+ (tested on 3.1.11 / DB v341) Guarantees tblsessions, tbloptions, and hook parity Standard Perfex CI3 execution
PHP Runtime PHP 8.2+ (tested on 8.2 and 8.3) Required by CI4 4.7.6 strict typing and PSR-4 engine Layer 1 Circuit Breaker routes to CI3
PHP Extensions ext-intl, ext-mbstring, ext-mysqli, ext-json Needed for CI4 i18n, strings, MySQLi, and JSON APIs Layer 2 Circuit Breaker routes to CI3
Zend OPcache Enabled (recommended) Caches route_manifest.php for < 0.5ms routing Falls back to filesystem PHP include
Writable Runtime Path modules/ignite_core/runtime/writable/ (755 / 644) Stores route_manifest.php, CI4 logs, and incident JSON Flagged in 10-point Control Plane check

Installation Methods, Permissions & Staff RBAC

IgniteCore installs through the standard Perfex admin interface or via SFTP/SSH without touching system/ or application/.

Method 1: Perfex Admin ZIP Upload (Recommended)

  1. Log in as an Administrator and navigate to Setup > Modules.
  2. Upload ignite_core.zip and click Install.
  3. Locate IgniteCore in the module list and click Activate.

Method 2: Manual Upload via SFTP or CLI

  1. Extract ignite_core/ into <perfex-root>/modules/ignite_core/.
  2. Ensure modules/ignite_core/runtime/writable/ (cache/, logs/, session/, uploads/) is writable by PHP (755 directories, 644 files):
chmod -R 755 modules/ignite_core/runtime/writable
find modules/ignite_core/runtime/writable -type f -exec chmod 644 {} +
  1. Open Setup > Modules and click Activate.

Staff RBAC Permissions

IgniteCore enforces Perfex native Role-Based Access Control (tblstaff_permissions) under capability ignite_core:

  • View (view): Grants read-only access to Setup > IgniteCore diagnostics and telemetry (staffAuth + staffCan:view,ignite_core).
  • Edit (edit): Required for attaching/detaching entry points, toggling routes, enabling Safe Mode, replaying outbox events, and Quarantine/Restore actions.

Choosing & Attaching an Entry Point Mode

IgniteCore evaluates requests before CI3 boots using one of two mutually exclusive entry strategies tailored to your web server.

Entry Mode Best Suited For Core File Touch CLI / UI Attachment
Managed .htaccess Block Apache mod_rewrite, OpenLiteSpeed Zero PHP edits; # ignite_core:start ... # ignite_core:end in .htaccess 1-click in Entry Point & Safety tab
3-Line index.php Marker Nginx, IIS, hardened CyberPanel Prepends // ignite_core:start in index.php with *.orig.bak.php backup Entry Point & Safety UI or spark ignite:entry attach-index

Mode A: Apache & OpenLiteSpeed Managed .htaccess

IgniteCore inserts a delimited block between # ignite_core:start and # ignite_core:end at the top of root .htaccess, routing incoming HTTP requests to modules/ignite_core/bootstrap/dispatcher.php while keeping all existing Perfex rewrite rules intact below.

OpenLiteSpeed Tip: Because OpenLiteSpeed caches .htaccess directives in memory, reload it if new CI4 routes still hit CI3 right after attaching:

/usr/local/lsws/bin/lswsctrl reload

Mode B: Nginx, IIS & Hardened CyberPanel (index.php Marker)

Nginx, IIS, and hardened CyberPanel vhosts ignore .htaccess overrides. Use the 3-line index.php marker instead. IgniteCore writes a guarded index.orig.bak.php backup before adding the marker.

Manage the marker from Entry Point & Safety or via Spark CLI:

php modules/ignite_core/spark ignite:entry status
php modules/ignite_core/spark ignite:entry attach-index
php modules/ignite_core/spark ignite:entry detach

Required Nginx Security Rule

IgniteCore includes 33 index.html guards and .htaccess protections, which Nginx ignores. Add this block to your Nginx server config to block direct HTTP access to runtime/, boot_ci4.php, and spark:

location ~* ^/modules/ignite_core/(runtime/|bootstrap/boot_ci4\.php|spark$) {
    deny all;
    return 403;
}

Test and reload Nginx (nginx -t && systemctl reload nginx). You can copy this snippet directly from Entry Point & Safety.

Walkthrough of the 6-Tab Admin Control Plane

Open Setup > IgniteCore to manage the entire runtime from six tabs:

  1. Overview & Health: Displays a live 10-point server check (PHP 8.2+, intl, mbstring, mysqli, OPcache, writable directory, entry attachment, manifest integrity, DB tables, Safe Mode) plus 1-click live probes for Health API (/ignite/api/v1/health), Staff SSO (tblsessions parity), and Cross-Kernel CSRF POST (PerfexCsrfFilter).
  2. Modules & Routes: Lists Dual-Mode modules (modules/{slug}/ignite/manifest.php), provides per-route CI4/CI3 toggles, flags prefix overlaps with application/config/my_routes.php, and recompiles the OPcache route_manifest.php.
  3. Entry Point & Safety: Auto-detects Apache, OpenLiteSpeed, Nginx, or IIS, handles .htaccess / index.php attach and detach actions, displays the Nginx /runtime/ deny rule, and controls Emergency CI3 Safe Mode.
  4. Event Outbox & Audit: Monitors tblignite_core_event_outbox counters (pending, relayed, failed), runs manual event replay outside Perfex Cron, and logs admin operations.
  5. Developer SDK: Documents the zero-coupling ignite/manifest.php contract, route filters (perfexCsrf, staffAuth, staffCan, sessionReadOnly), and 4 Spark CLI commands (ignite:doctor, ignite:manifest, ignite:entry, ignite:make-module).
  6. Benchmark & Compatibility: Runs live CI3 vs CI4 benchmarks (/admin/ignite_core/bench_ci3 vs /admin/ignite_core/bench_ci4 vs /ignite/api/v1/health) and opens the Compatibility Scanner & Auto-Quarantine Guard.

5-Layer Safety Circuit Breaker & Emergency Recovery

Before boot_ci4.php loads any CodeIgniter 4 class, dispatcher.php evaluates five sequential gates:

  1. PHP Version Gate: Confirms PHP_VERSION_ID >= 80200.
  2. Extension Gate: Confirms intl and mbstring are loaded.
  3. Safe Mode Gate: Checks for .disabled or IGNITE_CORE_ENABLED === false.
  4. Manifest Gate: Confirms route_manifest.php and bootstrap/boot_ci4.php exist and parse cleanly.
  5. Bypass Gate: Honors ?ignite_fallback=1 per request.

Emergency Recovery Controls

  • Per-Request Bypass (?ignite_fallback=1): Append ?ignite_fallback=1 to any URL to force that request onto Perfex CI3 immediately.
  • Emergency CI3 Safe Mode (.disabled): Toggle Safe Mode in Entry Point & Safety or create an empty modules/ignite_core/runtime/writable/.disabled file to pause all CI4 routing globally.
  • Constant Override: Add define('IGNITE_CORE_ENABLED', false); to application/config/app-config.php.
  • Non-Destructive Deactivation: Deactivating IgniteCore under Setup > Modules removes entry markers cleanly without deleting Dual-Mode module data.
  • 1-Click Re-Attach After Perfex Auto-Update: If a core update overwrites .htaccess or index.php, traffic continues on CI3 with zero downtime; click Attach Entry Point (or run spark ignite:entry attach-index) to restore CI4 routing.

Frequently Asked Questions

Does IgniteCore edit Perfex CRM core files inside system/ or application/? No. IgniteCore lives inside modules/ignite_core/ and attaches only a delimited # ignite_core:start block in .htaccess or a 3-line // ignite_core:start marker in root index.php with an automatic *.orig.bak.php backup.

What happens when a Perfex Auto-Update overwrites .htaccess or index.php? The CRM keeps running on Perfex CI3 with zero downtime. Once the update finishes, click Attach Entry Point under Setup > IgniteCore > Entry Point & Safety to re-enable CI4.

Can I install IgniteCore on shared hosting without SSH or Composer? Yes. CodeIgniter 4.7.6 and system/ThirdParty/ ship inside the ZIP (Zero-Vendor), and all setup, entry attachment, and diagnostics run in the Admin UI.

How do I verify Staff SSO and CSRF work across CI3 and CI4? Open Setup > IgniteCore > Overview & Health and run the Staff SSO Probe and CSRF POST Probe to test live tblsessions and hash_equals() parity.

Related Guides

HeadRandom Perfex CRM Engineering

Need a Custom Perfex CRM Module, Bug Fix, or CodeIgniter 4 Upgrade?

Avoid broken updates, PHP 8.2-8.4 errors, and risky core edits. HeadRandom provides custom Perfex CRM module development, upgrade, and bug-fixing services for any third-party or custom module on your Perfex CRM installation, plus upgrading Perfex CRM from CodeIgniter 3 to CodeIgniter 4 via IgniteCore for Perfex CRM.

Build, Upgrade & Fix Any Perfex CRM Module

Develop new custom modules from scratch, patch bugs or hook conflicts on existing client modules, and update legacy code for clean PHP 8.2-8.4 compatibility with zero core file hacks. View Perfex CRM module development scope.

CodeIgniter 3 to CodeIgniter 4 via IgniteCore

Migrate your Perfex CRM runtime to CodeIgniter 4 (4.7.6) using IgniteCore for Perfex CRM (independent module by HeadRandom) with Dual-Mode CI3 fallback, 32% to 75% lower latency, 50% less RAM, and custom CI4 porting for third-party modules. See CI3 to CI4 upgrade options.

40+ Commercial Modules Published100% Zero Core File Edits0 High Security Audit GateTransparent Pricing from $39

Combine 2+ HeadRandom services (Custom Module, IgniteCore CI4 Upgrade, or Website Care) to save 30% automatically.