PHP 8.4+ Framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
CodeHydrater/docs/Zephir_code.md

2.7 KiB

Install the Project Files

First, see CodeHydrater.md file for install instructions for both the Framework & the Project files... then do:

# Zephir source code files
Zephir/aes-license/hydraterlicense/hydraterlicense/
├── keygenerator.zep
├── licensewriter.zep
└── makelicense.zep
Zephir/aes-loader/hydraterbootloader/hydraterbootloader/
├── licenseverifier.zep
└── loader.zep

2 directories, 5 files

Installing Zephir on DEV BOX ONLY

To INSTALL Zephir & Parser, see the websites: https://github.com/zephir-lang/php-zephir-parser https://docs.zephir-lang.com/latest/installation/

Follow their instructions, install/enable the Parser library for PHP, add to your php.ini files [NOTE: .so files are Linux..., .dll are Windows]: [Zephir Parser] extension=zephir_parser.so

Building the Extensions

$ cd /usr/share/php/CodeHydrater/Zephir/aes-license/hydraterlicense
$ zephir build

$ cd /usr/share/php/CodeHydrater/Zephir/aes-loader/hydraterbootloader
$ zephir build

Note that Zephir compiles up to the current version of PHP you have installed, so beware of updates!

NOTES about Zephir extension files:

AS long as your PROD Environment has the same system Architecture IE 64bit Linux on AMD64... then copy the extension files from DEV to PROD...

PROD will need:

zephir_parser and hydraterbootloader, to work for Encrypted Features to work. If not using this then do not worry about zephir nor the bootloader...

DEV will need:

Running Zephir gives you these Shared Object files, add them to your php.ini files (Examples: /etc/php/8.4/cli/php.ini and /etc/php/8.4/fpm/php.ini:

[Zephir Parser]
extension=zephir_parser.so
extension=hydraterlicense.so
extension=hydraterbootloader.so

Update your Secret PHP Files on DEV BOX only

$ cd /var/www/ProjectCodeHydrater/protected/src/secret_php_files
Each file should correspond with the Array_For_Files inside of make_license.php 
Don't Ship these secret_php_files, they do not belong on PROD!!!!

The .php file names [in secret_php_files folder] must match the .aes file names!

Make a new License File and AES data

$ cd /var/www/ProjectCodeHydrater/protected/cli
$ php make_license.php

That will generate both keydata and aes files and folders! #Do Ship to PROD the keydata and aes folders:

/var/www/ProjectCodeHydrater/protected/keydata [Folder and files].
/var/www/ProjectCodeHydrater/protected/src/aes [Folder and files].

Don't Ship the License Code

If you are crafty, and do not Want the Customer to have access to your AES encrypted Features... Do NOT share the extension hydraterlicense.so file, and remove any traces of source code in: Zephir/aes-license . As they allow one to generate licenses and features.