Home > Article > Backend Development > PHP: Using Zend to encrypt source code, Zend Guard installation and Zend Guard Run-time support mi_PHP tutorial
Zend Guard is the most mature PHP source code encryption product currently on the market.
I happened to need to encrypt my own products. After struggling for a whole night, I finally got it. I recorded the problems and solutions I encountered so that I can help others in the future.
I am using Wampserver, and the php version is 5.3.10.
Click to download Zend Guard5.5.0. After the download is completed, please install it by yourself
You need to pay attention to the following points here:
1. The validity period of this KEY is July 10, 2010, so when it is activated Please adjust your computer system time to before this time
2. This KEY activates a trial version, and encrypted files are only valid for 14 days. Therefore, when encrypting files, please adjust your computer system time backward N Year, such as 2099-12-31
3. Download the authorization file [zend_guard authorization file.zip], unzip it to get zend_guard.zl, which is the file for activation
4. Open Zend Guard 5.5.0, [Help ]->[Register]->[Search for a license file on my disk], select the file to activate.
1. Open Zend Guard 5.5.0, [File]->[New]->[Zend Guard Project], create a new project
2. In the pop-up window, just fill in the first 3 items casually. The last item is the storage location of the encrypted file, then [Next];
3. This step is to select the file to be encrypted, which can be a single file [Add File] or the entire folder [Add Folder], then [Next ]
4. The next step is to select the PHP version [compare it with the PHP version on your server]. This is very important. If the version is incorrect, an error will occur. [Finish] Complete the creation of the project
5. On the left side of Zend Guard In Guard Explorer, you can see your new project. After selecting it, right-click [Encode Project] and complete
Although the PHP source code can be successfully encrypted now, when executing the script, you will find that it cannot be executed normally and the following message will be displayed
Zend Guard Run-time support missing!
One more more files on this web site were encoded by ZendGuard and the required run-time support is not installed or properly configured.
......
It turns out that the encrypted php code requires the ZendGuardLoader module to run properly.
Because my php version is 5.3.10, I only provide ZendGuardLoader-php-5.3-Windows. If it is other versions of php, please Baidu.
Click to download ZendGuardLoader-php-5.3-Windows
After downloading, unzip the compressed package, find the ZendLoader.dll file in the directory, put it in the ext directory of your php directory, and then edit the php.ini file. Add a piece of code (eg):
[Zend.loader]
zend_loader.enable=1
zend_loader.disable_licensing=1
zend_loader.obfuscation_level_support=3
zend_loader.license_path=
zend_extension="Your PHP installation directory extZendLoader.dll"
Restart wampserver
If you are lucky, you will find that it can be grown and executed. If you are not lucky, you will still find the above error.
We have installed the zend guard loader here, why can’t we still execute the zend encrypted php script?
By looking at the output phpinfo() information, I found that there are several lines of information:
PHP Extension 20090626
Zend Extension 220090626
Zend Extension Build API220090626,TS,VC9
Please note that TS is the abbreviation of thread safety (i.e. thread safety)
I couldn’t find the reason for a while, so I simply opened the zend guard official website to search, and then it was solved.
It turns out that zend guard loader only supports the NTS version, which means that if your php version is TS, you cannot use zend guard loader. If you want to check whether your php is ts or nts, you only need to output phpinfo, and then search: Thread Safety, disabled corresponds to the nts version, otherwise it is ts.
Therefore, the ultimate solution is to download the php NTS version and install it.
ZendGuard 5.5.0 cracking method + registration file KEY download
PHP (Thread Safe and Non Thread Safe) version instructions under Windows
Author: A former civil engineer(http://www.cnblogs.com/hongfei)
Original address: http://www.cnblogs.com/hongfei/p/3587399. html