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

IgniteCore for Perfex CRM: Complete CodeIgniter 4.7.6 Runtime Guide

216.04 ms

IgniteCore is an independent third-party module developed by PolyXGO (modules/ignite_core/) that embeds a self-contained, zero-vendor CodeIgniter 4.7.6 runtime directly inside Perfex CRM Classic, solving Classic's CodeIgniter 3 upgrade bottleneck without touching core files or forcing a full rewrite onto Perfex CRM Next 1.0 (Laravel). Using a < 0.5 ms Strangler Fig Pre-Boot Front-Dispatcher and OPcache route_manifest.php, IgniteCore achieves 32% faster admin routes (234.4 ms vs 342.4 ms), 75% faster stateless APIs (84.8 ms), 50% lower peak RAM (2.00 MB vs 4.00 MB), and 61% fewer loaded PHP files (123 vs 313) while keeping 100% native CI3 fallback.

Why Perfex CRM Classic Needs an Intermediate CI4 Runtime

Hosting panels (cPanel, CyberPanel, Plesk, OpenLiteSpeed) are retiring PHP 8.1 and enforcing PHP 8.2, 8.3, and 8.4 defaults, while CodeIgniter 3 (3.1.11) has reached end-of-life (EOL) for official PHP updates. Replacing CI3 in place fails because Perfex core and third-party modules depend directly on CI3 globals. IgniteCore applies the Strangler Fig pattern to evaluate requests before either framework loads, executing modern routes on isolated CodeIgniter 4.7.6 while sending all legacy routes cleanly to stock Perfex CI3.

The 7 Real CI3-to-CI4 Pain Points in Perfex CRM

Static inspection of a 54-module Perfex CRM deployment (CodeIgniter 3.1.11, DB v341) identifies seven concrete blockers to direct CI4 adoption:

  1. Massive CI3 Monolith Coupling: 5,625 PHP files (1,365 core + 4,260 modules) contain 19,128 $this->db, 7,147 $this->input, 3,995 $this->load->, 2,281 get_instance(), and 2,827 hooks()-> calls across 918 unique hooks, ruling out a single-step "Big Bang rewrite."
  2. Fatal In-Process Kernel Collisions: App_Controller.php calls die() when CI_VERSION != '3.1.11'. Dual-booting in one PHP process triggers 13 constant collisions (APPPATH, FCPATH, ENVIRONMENT, EXIT_*) and 89 global function collisions (5 in Common.php, behavioral conflicts in lang() and redirect(), plus 82 helper functions).
  3. CodeIgniter 3 EOL Under PHP 8.2-8.4: Official CI3 support stops at PHP 8.1, exposing production sites during automated host PHP upgrades.
  4. Runtime Breakages on PHP 8.2+: Creation of dynamic property notices on CI_Loader and CI_URI, implicit null TypeError in trim(), strlen(), and explode(), deprecated functions (utf8_encode, utf8_decode, strftime, create_function), and ${var} interpolation corrupt AJAX JSON and TCPDF/Dompdf exports.
  5. Monolith Boot Overhead & Session Locking: Every CI3 request autoloads 47 helpers, 10 libraries, 4 models, and active modules (313 files, 4.00 MB RAM), while PHP session locks serialize concurrent dashboard AJAX calls.
  6. Legacy Security Maintenance Burden: CI3 lacks strict_types=1, relies on heuristic xss_clean() filtering, and pushes cookie/input hardening onto manual patches.
  7. Perfex CRM Classic vs Next 1.0 Architecture Gap: Perfex CRM Classic stays permanently on CodeIgniter 3 (it will never run on CodeIgniter 4), while Perfex CRM Next 1.0 is rebuilt from scratch on Laravel 13+ / Livewire 4 / PHP 8.4+ with zero compatibility for Classic CodeCanyon modules. Classic Migrator excludes third-party module tables and requires manual media, SMTP, payment, and cron cutover, making CodeIgniter 4 via IgniteCore the optimal upgrade path when continuing on Classic.

Security, Speed & Technology: 3-Way Intermediate Comparison Matrix

Live benchmarks on PHP 8.3 + OpenLiteSpeed executing an identical workload (DB ping, tbloptions read, Staff identity lookup, and 50-record SHA-256 serialization) show:

Runtime Benchmark
Endpoint Benchmark
Kernel
HTTP Median
Server Exec
Peak RAM
Loaded Files
Delta vs CI3 Verified
Perfex Core CI3 (/admin/ignite_core/bench_ci3) CI3 3.1.11 342.4 ms 0.40 ms 4.00 MB 313 files Baseline
IgniteCore CI4 Runtime (/admin/ignite_core/bench_ci4) CI4 4.7.6 234.4 ms 0.22 ms 2.00 MB 123 files
32% faster / -50% RAM / -61% files
Stateless CI4 Health API (/ignite/api/v1/health) CI4 4.7.6 84.8 ms 0.16 ms - -
75% faster API response

Comparing all three architectural strategies side by side:

Architecture Comparison
Evaluation Dimension
Stock Perfex CI3 (3.1.11)
CI3 3.1.11
Standalone CI4 Full Rewrite
Full Rewrite
IgniteCore Intermediate Bridge (CI4 4.7.6 + CI3 Fallback) Zero Core Edits
CI4 4.7.6 + CI3 Fallback
Security & Isolation EOL above PHP 8.1; no strict_types=1; heuristic xss_clean() strict_types=1, Laminas\Escaper; loses tblsessions SSO and RBAC parity strict_types=1 + Laminas\Escaper; 6 filters (perfexCsrf via hash_equals(), staffAuth, staffCan, clientAuth, apiAuth, sessionReadOnly); tblsessions SSO (INT(10) UNIX, idPrefix=''); redacted production health; 33 index.html guards + Nginx /runtime/ deny rule
Speed & Resources Autoloads 47 helpers, 10 libraries, 4 models (313 files, 4.00 MB RAM, 342.4 ms median) Fast on PHP 8.2-8.4, but demands multi-month rewrites < 0.5 ms OPcache dispatcher; 234.4 ms CI4 admin (-32%), 84.8 ms API (-75%), 2.00 MB RAM (-50%), 123 files (-61%); sessionReadOnly prevents AJAX locks
Architecture & Stack Global scope, no PSR-4, dynamic properties PSR-4, Composer, Spark CLI, PHP 8.2-8.4 Embedded Zero-Vendor CI4 4.7.6 (no Composer); Strangler Fig Pre-Boot Dispatcher; 5-Layer Circuit Breaker; 7 Shared Bridges; Cron Event Outbox; zero-lock-in Dual-Mode SDK
Module & Upgrade Safety Runs CodeCanyon modules, exposed to PHP 8.2-8.4 notices Breaks 100% of CI3 modules (5,625 files, 89 functions, 13 constants) Keeps 100% of Perfex core and CI3 modules intact; Compatibility Scanner (0-100) + Auto-Quarantine (3 errors / 300s reverts to CI3); zero core edits

Pre-Boot Strangler Fig Architecture

flowchart TD
    REQ["Incoming HTTP Request"] --> ENTRY["Entry Point (.htaccess Block or 3-Line index.php Marker)"]
    ENTRY --> DISP["Pre-Boot Front-Dispatcher (< 0.5ms Pure PHP)"]
    DISP --> CB{"5-Layer Circuit Breaker<br/>PHP >= 8.2, intl/mbstring,<br/>Enabled Flag, Manifest, No Fallback"}
    CB -->|"Fail or Unmatched Route"| CI3["Stock Perfex CRM CI3 (index.php Fallback)"]
    CB -->|"Pass"| MAN["OPcache route_manifest.php Match"]
    MAN -->|"Unmatched or Disabled"| CI3
    MAN -->|"Matched & Enabled"| CI4["Pure CodeIgniter 4.7.6 Runtime (Zero-Vendor)"]
    CI4 --> FILT["Route Filters (perfexCsrf, staffAuth, staffCan, sessionReadOnly)"]
    FILT --> BRIDGES["7 Shared Bridges (Config, DB/File Session, Options, Auth, Lang, Outbox)"]
    BRIDGES --> DB[("Shared Perfex MySQL (tblsessions, tblstaff_permissions, tbloptions)")]
    CI3 --> DB

HTTP requests hit modules/ignite_core/bootstrap/dispatcher.php via .htaccess (Apache / OpenLiteSpeed) or a 3-line index.php marker (Nginx / IIS / CyberPanel) in < 0.5 ms. Before either kernel boots, the 5-Layer Circuit Breaker verifies: (1) PHP >= 8.2, (2) ext-intl and ext-mbstring, (3) Safe Mode .disabled and IGNITE_CORE_ENABLED, (4) route_manifest.php and Boot.php integrity, and (5) ?ignite_fallback=1. Only matched, enabled routes boot CodeIgniter 4.7.6, eliminating all 13 constant and 89 function collisions via Mutually Exclusive Kernel Execution.

6-Tab Admin Control Plane Overview

Under Setup > IgniteCore, administrators control both kernels through six tabs:

  1. Overview & Health: 10-point server diagnostic matrix plus 1-click Health API, Staff SSO, and cross-kernel CSRF POST probes.
  2. Modules & Routes: Per-route CI4/CI3 toggles, my_routes.php overlap checks, and OPcache manifest compilation.
  3. Entry Point & Safety: Web server detection, .htaccess / index.php attach/detach controls, Emergency Safe Mode, and Nginx /runtime/ deny snippets.
  4. Benchmark & Compatibility: Apples-to-apples CI3 vs CI4 live benchmark suite and deterministic 0-100 PHP 8.2/8.3 module compatibility audits.
  5. Event Outbox & Audit Log: Real-time tblignite_core_event_outbox queue monitoring (relayed via after_cron_run), manual replay, and admin audit history.
  6. Diagnostics & Auto-Quarantine Guard: Stack trace attribution to modules/{slug}/ignite/, 8-category root-cause classification, and automatic CI3 fallback after 3 HTTP 500+ errors in 300 seconds.

Complete Topic Directory: 12 Spoke Guides Across Groups A, B, C & D

Group A: Perfex CRM CI3-to-CI4 Pain Points & Strategy

Group B: Security, Speed & Strangler Fig Architecture

Group C: Installation, Operations & Compatibility Guard

Group D: Dual-Mode Developer SDK & Case Study

Explore licensing, live demos, and full specifications on the IgniteCore for Perfex CRM Product Page.

Frequently Asked Questions

Does IgniteCore edit core Perfex CRM files or break Auto-Updates? No. system/ and application/ stay untouched. If a Perfex Auto-Update overwrites .htaccess or index.php, requests fall back to CI3 with zero downtime until re-attached in one click.

Do existing CodeCanyon and custom CI3 modules keep working? Yes. Standard CI3 routes bypass CI4 automatically and run natively on CodeIgniter 3.1.11.

Is Composer or SSH required on shared hosting? No. Zero-Vendor CodeIgniter 4.7.6 and system/ThirdParty/ (Laminas\Escaper, Psr\Log, Kint) ship inside modules/ignite_core/runtime/.

What happens if a Dual-Mode CI4 module throws runtime errors? Auto-Quarantine maps HTTP 500+ exceptions to the owning module and disables its CI4 routes after 3 errors in 300 seconds, restoring CI3 fallback immediately.

On-Demand Migration & Module Porting: Need help with a full-system Perfex CRM Classic migration to modern Perfex CRM Core / Next 1.0 or upgrading existing third-party modules to run on IgniteCore CodeIgniter 4? HeadRandom handles custom porting, ETL scripts, and security verification.

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.