Home Backend Development PHP Tutorial Zend Guard使用指南及问题处理_php技巧

Zend Guard使用指南及问题处理_php技巧

May 16, 2016 pm 08:26 PM
guard zend

Zend Guard是目前市面上最成熟的PHP源码加密产品了。

刚好需要对自己的产品进行加密,折腾了一晚上,终于搞定,将碰到的问题及解决方法记录下来,方便日后需要,也可以帮助其他人。
我使用的是Wampserver,其中php的版本是5.3.10。

Zend Guard的安装及破解

点击下载Zend Guard5.5.0,下载完成后,请自行傻瓜化安装

这里需要注意以下几点

  1、本KEY的有效时间为2010年7月10号,因此激活时请将自己电脑系统时间调整至这个时间以前
  2、本KEY激活的为试用版,加密过的文件只有14天有效时间,因此在加密文件时,请将自己电脑系统时间向后调整N年,比如2099-12-31
  3、下载授权文件[zend_guard授权文件.zip],解压得到zend_guard.zl,即为激活用的文件
  4、打开Zend Guard 5.5.0,[Help]->[Register]->[Search for a license file on my disk],选择文件激活即可。

如何使用Zend Guard进行加密

  1、打开Zend Guard 5.5.0,[File]->[New]->[Zend Guard Project],新建项目
  2、在弹窗的窗口,前3项随便填吧,最后一项是加密后文件的保存位置,然后[Next];
  3、本步骤是选择要加密的文件,可以为单个文件[Add File]和整个文件夹[Add Folder],然后[Next]
  4、接下来是选择PHP版本[与你服务器上PHP的版本相对照],这里很重要,版本不对会出错,[Finish]完成项目的创建
  5、在Zend Guard左侧的Guard Explorer中,可以看到你新建的项目了,鼠标选中后,右键[Encode Project],完成

Zend Guard Run-time support missing问题的解决

虽然现在可以成功加密php源码了,但是当执行脚本的时候,会发现不能正常执行,会显示如下信息

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 orproperly configured.
......

原来,加密后的php代码需要ZendGuardLoader模块才能正常运行。
因为我的php版本是5.3.10的,所以我这里只提供了ZendGuardLoader-php-5.3-Windows,如果是其他版本的php,请自行百度。
点击下载ZendGuardLoader-php-5.3-Windows
下载好后解压压缩包,找到目录下的 ZendLoader.dll 文件,将它放到你的php目录下ext下,再编辑php.ini文件,添加一段代码(如):

复制代码 代码如下:

[Zend.loader]
zend_loader.enable=1
zend_loader.disable_licensing=1
zend_loader.obfuscation_level_support=3
zend_loader.license_path=
zend_extension="你的PHP安装目录\ext\ZendLoader.dll"

  重启wampserver
  运气好的话,会发现可以成长执行了,运气不好的话,还是会发现以上错误。
  这里我们已经安装了zend guard loader了,为什么还是无法执行zend加密后的php脚本呢?
  通过查看输出phpinfo()信息,我发现有这么几行信息:

复制代码 代码如下:

  PHP Extension 20090626
  Zend Extension 220090626
  Zend Extension Build API220090626,TS,VC9

  请注意,其中的TS是thread safety的简写(即线程安全)

  一时也找不出原因,索性直接打开zend guard官网进行搜索,然后就解决了。

  原来,zend guard loader只支持NTS的版本,意味着如果你的php版本是TS的话,就没法使用zend guard loader了,如果你想查看自己的php是ts还是nts的,只需要输出phpinfo,然后搜索下:Thread Safety,disabled对应nts版本,否则为ts。

  因此,终极解决办法就是,下载个php NTS版本进行安装即可。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to use ACL (Access Control List) for permission control in Zend Framework How to use ACL (Access Control List) for permission control in Zend Framework Jul 29, 2023 am 09:24 AM

How to use ACL (AccessControlList) for permission control in Zend Framework Introduction: In a web application, permission control is a crucial function. It ensures that users can only access the pages and features they are authorized to access and prevents unauthorized access. The Zend framework provides a convenient way to implement permission control, using the ACL (AccessControlList) component. This article will introduce how to use ACL in Zend Framework

PHP Implementation Framework: Zend Framework Getting Started Tutorial PHP Implementation Framework: Zend Framework Getting Started Tutorial Jun 19, 2023 am 08:09 AM

PHP implementation framework: ZendFramework introductory tutorial ZendFramework is an open source website framework developed by PHP and is currently maintained by ZendTechnologies. ZendFramework adopts the MVC design pattern and provides a series of reusable code libraries to serve the implementation of Web2.0 applications and Web Serve. ZendFramework is very popular and respected by PHP developers and has a wide range of

Laravel development: How to manage user authentication with Laravel Guard? Laravel development: How to manage user authentication with Laravel Guard? Jun 13, 2023 pm 04:41 PM

Laravel development: How to manage user authentication with LaravelGuard? In web applications, security and user authentication are crucial. As your business grows, so does the number of users, and without a good user authentication scheme implemented, your application can be vulnerable to a variety of attacks, including malicious attacks, data leaks, and other security issues. Fortunately, the Laravel framework provides a simple yet effective way to handle user authentication. This method is called Gu

How to configure the Window2003 IIS+MySQL+PHP+Zend environment How to configure the Window2003 IIS+MySQL+PHP+Zend environment Jun 02, 2023 pm 09:56 PM

The Windows 2003 installation package includes Zend, PHP5.2.17, PHPWind8.7 and PHPMyadmin3.5.2. You can download the installation package directly to save time searching for resources. However, since MySQL has exceeded the upload limit, you need to go to the MySQL official website to download. Then unzip and copy to the D drive, as shown below: MySQLinDdisk Install and configure WindowsIIS+FTP Click Start>Control Panel>Add or Remove Programs.AddingordeletingaPG Click Add/Remove Windows Components (A). Addingorde

PHP does not recognize ZendOptimizer, how to solve it? PHP does not recognize ZendOptimizer, how to solve it? Mar 19, 2024 pm 01:09 PM

PHP does not recognize ZendOptimizer, how to solve it? In PHP development, sometimes you may encounter a situation where PHP cannot recognize ZendOptimizer, which will cause some PHP codes to not run properly. In this case, we need to take some measures to solve the problem. Some possible workarounds are described below, along with specific code examples. 1. Confirm whether ZendOptimizer is installed correctly: First, we need to confirm that ZendOptimizer

How to use the PHP framework Zend to develop an efficient ERP management platform How to use the PHP framework Zend to develop an efficient ERP management platform Jun 26, 2023 pm 11:00 PM

With the rapid development of information technology, more and more enterprises are beginning to realize the necessity of information management. ERP (Enterprise Resource Planning) management platform is an important tool for modern enterprise management, which can help enterprises realize resource planning, collaboration, control, optimization and management. Among them, the PHP framework Zend is an excellent development tool that can help developers develop ERP systems quickly and efficiently. This article will introduce how to use Zend to develop an efficient ERP management platform. 1. Determine requirements analysis before starting the development process

Laravel vs Zend: Which framework is better for developing large applications? Laravel vs Zend: Which framework is better for developing large applications? Jun 19, 2023 am 08:52 AM

With the continuous development of Internet applications, the demand for the development of large-scale applications is also increasing. In this context, it is particularly important to choose a development framework that suits you. Laravel and Zend are two widely used PHP frameworks. They each have their own advantages, but which one is more suitable for developing large-scale applications? Laravel is a popular development framework that has become one of the preferred frameworks for PHP developers. It adopts a modern design concept and has a variety of powerful built-in functions and tools, such as EloquentOR

How to optimize the performance of Zend Framework How to optimize the performance of Zend Framework Jan 22, 2024 am 11:25 AM

Zend framework is an open source web application framework based on PHP language and is widely used in the development of enterprise-level web applications. Although the Zend Framework occupies an important position in the market due to its high degree of modularity, scalability, and code reusability, this does not mean that its performance is necessarily efficient. In fact, how to optimize the performance of the Zend Framework has always been one of the focuses of developers. This article will explore how to improve the performance of the Zend Framework from multiple aspects. 1. Reasonable use of Zend framework’s caching mechanism Z

See all articles