问题
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:
I installed latest version of blenc from blenc-1.1.4b in xampp
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);
then created a file testcode.php with content:
echo "hello";
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