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

隐身守侯 提交于 2019-12-23 05:32:09

问题


When i run blenc encrypted file it gives error:

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

These Steps i'm followed for blenc usage:

  1. I installed latest version of blenc from blenc-1.1.4b in xampp

  2. then created a file encoder.php with content:

    $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);

  3. then created a file testcode.php with content:

    echo "hello";

  4. then i encoded the file named as testcode.php to encrypt.php.

And While run it, I got error given above.


回答1:


php_blenc need an absolute path for key_file like this in php.ini:

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

and for license key error build blenc yourself and in source files blenc_protect.h

...

#define BLENC_PROTECT_EXPIRE "99-99-9999"

... 

replace with

...

#define BLENC_PROTECT_EXPIRE "01-01-9999"

... 


来源:https://stackoverflow.com/questions/29105962/fatal-error-blenc-compile-module-php-blenc-was-expired-please-buy-a-new-licen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!