Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6537326
  • 博文数量: 1159
  • 博客积分: 12444
  • 博客等级: 上将
  • 技术积分: 12570
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-13 21:34
文章分类

全部博文(1159)

文章存档

2016年(126)

2015年(350)

2014年(56)

2013年(91)

2012年(182)

2011年(193)

2010年(138)

2009年(23)

分类: 系统运维

2011-10-25 16:16:24




在Linux下为PHP5.3.8配置Zend Guard Loader(图文)(原创)

从PHP5.3开始如果要支持ZendGuard加密的PHP代码,必须安装Zend Guard Loader,老的zend optimizer将不被支持。

本文介绍在工作中为Linux安装Zend Guard Loader支持的过程。

操作系统为CentOS5.5,PHP版本为5.3.8(CentOS5.5中的PHP默认版本较低,如果要升级到PHP最新版,可以使用remi的report源进行升级)。

本文由原创 ,转载请注明出处。

1.从Zend.com下载最新的Linux操作系统系下的Zend Guard Loader:本文用的是x86-64位的,下载的文件为:ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz

2.上传至Linux服务器并解压缩,注意阅读生成目录下的README文件。全文如下(添加必要的注释).

在/etc/php.d/目录下创建文件zend.ini,内容如下:

zend_extension=/usr/lib64/php/modules/ZendGuardLoader.so

注意路径一定要写上,刚开始没写路径,老是加载不上ZendGuardLoader.so

也可以直接将上面的配置写入/etc/php.ini文件中,效果一样。

3.重启httpd服务:service httpd restart。

4.(内容为),看到如下内容及证明安装成功了。

zend guard loader
注意:with Zend Guard Loader v3.3出现表示安装成功,如果没有则安装失败。

5.其他的可选配置,可以参考下面的README文件。

本文由原创 ,转载请注明出处。

1. Extract the Zend Loader package.解压缩

2. Locate and extract the ZendGuardLoader.so (Linux) or ZendLoader.dll (Windows) that corresponds to your php version.确定ZendGuardLoader.so 的位置,为了方便本人将其放在了PHP的模块默认位置:/usr/lib64/php/modules

3. Add the following line to your php.ini file for loading the ZendGuardLoader:在php.ini文件中添加指令(注意要协商完整路径,否则无法加载)
   Linux and Mac OS X:      zend_extension=
   Windows non-thread safe: zend_extension=

4. Add an aditional line to your php.ini for enabling ZendGuardLoader    可以不用加下面的,因为默认是enable的。
  ; Enables loading encoded scripts. The default value is On
  zend_loader.enable=1

5. Optional: following lines can be added your php.ini file for ZendGuardLoader configuration:可选的,可以不用加

   ; Disable license checks (for performance reasons)
     zend_loader.disable_licensing=0
   ; The Obfuscation level supported by Zend Guard Loader. The levels are detailed in the official Zend Guard Documentation. 0 - no obfuscation is enabled
     zend_loader.obfuscation_level_support=3
   ; Path to where licensed Zend products should look for the product license. For more information on how to create a license file, see the Zend Guard User Guide
     zend_loader.license_path=

6. If you use Zend debugger as well, please make sure to load it after the Zend guard Loader

7. If you use ioncube loader, please make sure to load it before Zend guard Loader

8. Restart your Web server.



++++++++++++++++++++++++++++++++++++++++

http://tech.climberlife.com/blog/?p=563

如果你了解Zend加密,你应该会经常接触Zend Guard,这是一个保护你Php程序版权的软件,不过因为目前php最新的版本是5.3.3,而ZendOptimizer-3.3.9 目前仅仅支持到php5.2版本,难道需要我们重新把php5.3版本降级到php5.2版本吗?答案显然不是。

随着php5.3系列版本的推出,Zend Guard也从先前的5.0.1版本升级到了5.1版本,但却没有在Zend主页上做介绍,下载链接如下

Zend Guard 5.1 EA
Linux:
Windows:
Mac:

Loader Files:
Linux 32 bit (Debian based):
Linux 64 bit (Debian based):
Linux 32 bit (Redhat based):
Linux 64 bit (Redhat based):
Windows:
Mac:

在这个版本中,Zend Guard Loader将替代原先的ZendOptimizer,也就是说ZendOptimizer在php5.2的时候生命周期就结束了,而在全新的 php5.3系列版本中都将用Zend Guard Loader替代;不光如此,Zend Guard 5.1也更新了加密php文件的算法来迎合php5.3新版本支持,所以我们之前用Zend Guard老版本加密过的php文件在php5.3+Zend Guard Loader的环境下都无法正常浏览,会报诸如下列错误
Fatal error: Incompatible file format: The encoded file has format major ID 1, whereas the Loader expects 4 in
解决方法就是把php源文件在Zend Guard 5.1下重新加密,然后才能浏览。

安装ZendOptimizer-3.3.9和Zend Guard Loader的文章稍后会放在文档区,欢迎大家下载学习。PDF格式。

php5.2.14加载ZendOptimizer-3.3.9.pdf 和php5.3.3加载Zend Guard Loader.pdf都已放出,请大家到文档区下载学习

补充:关于windows上的PHP5.3无法加载新的zendloader的问题解释如下
1、zendloader模块FOR windows 是在VC9环境下编译得
2、PHP和APACHE1 OR 2的组合环境应为VC6,比如Wamp这样的软件
3、PHP和IIS的组合环境应为VC9
4、在PHP主页上的windows版本下载区你可以选择你要下载哪个类型的PHP,地址如下

5、最后还是建议在linux环境上安装,有不会的我可以指导,如果确实需要安装php5.3以上版本,请手动安装IIS+PHP,选用VC9环境的PHP或者直接用PHP5.2版本搭载zend optimizer



++++++++++++++++++++++++++++++++++++

http://blog.sina.com.cn/s/blog_778357810100rgj8.html

Zend Guard Loader 安装说明
Zend Guard Loader installation instructions
-------------------------------------------
1. Extract the Zend Loader package.
2. Locate and extract the ZendGuardLoader.so (Linux) or ZendLoader.dll (Windows) that corresponds to your php version.
3. Add the following line to your php.ini file for loading the ZendGuardLoader:
Linux and Mac OS X: zend_extension=
Windows non-thread safe: zend_extension=
4. Add an additional line to your php.ini for enabling ZendGuardLoader ; Enables loading encoded scripts. The default value is On
zend_loader.enable=1
5. Optional: following lines can be added your php.ini file for ZendGuardLoader configuration:
; Disable license checks (for performance reasons)
zend_loader.disable_licensing=0
; The Obfuscation level supported by Zend Guard Loader. The levels are detailed in the official Zend Guard Documentation. 0 - no obfuscation is enabled
zend_loader.obfuscation_level_support=3
; Path to where licensed Zend products should look for the product license. For more information on how to create a license file, see the Zend Guard User Guide
zend_loader.license_path=
6. If you use Zend debugger as well, please make sure to load it after the Zend guard Loader
7. If you use ioncube loader, please make sure to load it before Zend guard Loader
8. Restart your Web server.

 

zend监视载入程序安装说明
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

1。解压缩Zend Loader包

2。查找和提取ZendGuardLoader.so(Linux)或ZendLoader.dll(Windows)并对应于你的php版本。

3。加入下面一行到你的php.ini文件以便加载ZendGuardLoader:
Linux和Mac OS X :  zend_extension=
Windows 非线程安全: zend_extension=

4。附加一行到你的php.ini以便可以加载ZendGuardLoader;
允许加载编译脚本.这个默认值是
   zend_loader.enable = 1

5。可选:以下几行可添加你的php.ini文件中配置ZendGuardLoader:

    ; 禁止许可证检查(为了性能原因)
    zend_loader.disable_licensing = 0
    ; Zend Guard Loader支持模糊处理层.这个层的详细说明参见Zend的官方文档.0-模糊处理不被允许
    zend_loader.obfuscation_level_support = 3
    ; 路径用于授权的Zend产品定位许可证。想要获取更多关于创建许可证文件的信息,可参见Zend Guard用户指南
    zend_loader.license_path =

6。如果你使用调试器,请确定在Zend guard Loader之后载入它.

7。如果你使用ioncube装载程序,请确定在Zend guard Loader之前载入它.  注:ionCube 一款类似zend的PHP加密/解密工具
8。重启你的网络服务器。


阅读(9441) | 评论(0) | 转发(1) |
0

上一篇:BOA移植

下一篇:BOA+PHP+SQLite之BOA

给主人留下些什么吧!~~