PHPackages                             codelockr/runtime - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. codelockr/runtime

ActiveLibrary[Security](/categories/security)

codelockr/runtime
=================

CodeLockr PHP runtime for encrypted scripts.

v1.0.1(2mo ago)07MITPHPPHP ^7.4|^8.0

Since Feb 21Pushed 2mo agoCompare

[ Source](https://github.com/CodeForgeX-Studio/codelockr-composer)[ Packagist](https://packagist.org/packages/codelockr/runtime)[ Docs](https://codelockr.cloud)[ RSS](/packages/codelockr-runtime/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

CodeLockr PHP Runtime
=====================

[](#codelockr-php-runtime)

Enterprise-grade PHP runtime for executing AES-256-GCM encrypted source code files.

Installation
------------

[](#installation)

```
composer require codelockr/runtime
```

Deployment
----------

[](#deployment)

Encrypted `.clr.php` files are **never** sent directly to users or exposed as publicly accessible files on the web server. Instead, use a `router.php` as the single entry point, with an `.htaccess` that forwards all traffic to it.

> **Important:** Place `.clr.php` files **outside** the web root or block direct access via `.htaccess`. They are only loaded through `router.php`.

### 1. `.htaccess` — Forward all requests to router.php

[](#1-htaccess--forward-all-requests-to-routerphp)

Place this file in your web root (`public/`):

```
Options -Indexes

RewriteEngine On

# Do not rewrite existing files and directories
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Forward everything to router.php
RewriteRule ^ router.php [QSA,L]

# Block direct access to .clr.php files (extra protection)

    Order allow,deny
    Deny from all

```

### 2. `router.php` — Central entry point

[](#2-routerphp--central-entry-point)

This is the only public PHP file. It handles all incoming requests and loads the appropriate encrypted module.

```
