Zend Guard is currently the most mature PHP source encryption products on the market.
Just need to encrypt their own products, tossing a night, finally fix, will encounter the problems and solutions recorded, convenient for future needs, can also help other people.
I am using Wampserver, where PHP version is 5.3.10.
Installation and cracking of Zend guard
Click to download Zend Guard5.5.0, after the download is complete, please self-fool installation
Here are a few things to keep in mind:
1. The effective time of this key is July 10, 2010, so please adjust your computer system time to this time before activating.
2, this key is activated for the trial version, encrypted files only 14 days of validity, so when encrypting the file, please adjust your computer system time backwards n years, such as 2099-12-31
3, download the authorization file [zend_guard authorization file. zip], unzip to get Zend_guard.zl, that is, the active file
4. Open Zend Guard 5.5.0,[help]->[register]->[search for a license files on my disk], select File activation.
How do I use Zend Guard for encryption?
1. Open Zend 5.5.0,[file]->[new]->[zend Guard Project], new project
2, in the window of the popup, the first 3 items to fill it, the last one is encrypted after the location of the file, and then [Next];
3, this step is to select the file to encrypt, can be a single file [Add file] and the entire folder [Add Folder], and then [Next]
4, Next is the choice of PHP version [with your server PHP version relative photos], here is very important, the version is wrong, [finish] to complete the creation of the project
5. In the Guard explorer on the left side of the Zend Guard, you can see your new project, and when the mouse is selected, right-click [Encode Project] to complete
Zend Guard run-time Support missing problem solving
虽然现在可以成功加密php源码了,但是当执行脚本的时候,会发现不能正常执行,会显示如下信息
Zend Guard run-time Support missing!
One more of the files on this web site were encoded by Zendguard and the required run-time are not installed Orproper Ly configured.
......
Originally, the encrypted PHP code requires the Zendguardloader module to function properly.
Because my PHP version is 5.3.10, so I only provide zendguardloader-php-5.3-windows here, if it is another version of PHP, please Baidu itself.
Click to download Zendguardloader-php-5.3-windows
Download and unzip the package, find the directory of the ZendLoader.dll file, put it in your PHP directory under Ext, edit the php.ini file, add a piece of code (such as):
[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 \ext\zendloader.dll"
重启wampserver运气好的话,会发现可以成长执行了,运气不好的话,还是会发现以上错误。这里我们已经安装了zend guard loader了,为什么还是无法执行zend加密后的php脚本呢?通过查看输出phpinfo()信息,我发现有这么几行信息:
PHP Extension 20090626 Zend Extension 220090626 Zend Extension Build API220090626,TS,VC9
Note that TS is a shorthand for thread safety (that is, threads are safe)
Can not find a reason, simply open Zend Guard official website to search, and then solved.
Originally, Zend Guard loader only supported the NTS version, meaning if your PHP version is TS, you will not be able to use Zend Guard loader, if you want to see if your PHP is TS or NTS, only need to output phpinfo, Then search under: Thread safety,disabled corresponds to NTS version, otherwise TS.
Therefore, the ultimate solution is to download a PHP NTS version to install.
PHP: Workarounds for source code encryption, Zend guard installation, and Zend guard Run-time support missing using Zend