Fatal error: blenc_compile: Module php_blenc was expired. Please buy a new license key or disable the module. in Unknown on line 0

Fatal error: blenc_compile: Module php_blenc was expired. Please buy a new license key or disable the module. in Unknown on line 0

当我 运行 blenc 加密文件时出现错误:

Fatal error: blenc_compile: Module php_blenc was expired. Please buy a new license key or disable the module. in Unknown on line 0

blenc 用法遵循这些步骤:

  1. 我在 xampp

  2. 安装了来自 blenc-1.1.4b 的最新版本的 blenc
  3. 然后创建了一个文件encoder.php,内容为:

    $source_code = file_get_contents("testcode.php"); $redistributable_key = blenc_encrypt($source_code, "encrypt.php"); $key_file = ini_get('blenc.key_file'); file_put_contents($key_file, $redistributable_key . "\n", FILE_APPEND);

  4. 然后创建了一个文件testcode.php,内容为:

    echo "hello";

  5. 然后我将名为testcode.php的文件编码为encrypt.php

虽然运行它,但我得到了上面给出的错误。

php_blenc 需要 key_file 的绝对路径,如 php.ini:

blenc.key_file = "d:/php/blenckeys"

并为许可证密钥错误构建 blenc 自己和源文件 blenc_protect.h

...

#define BLENC_PROTECT_EXPIRE "99-99-9999"

... 

替换为

...

#define BLENC_PROTECT_EXPIRE "01-01-9999"

...