简体   繁体   English

任何使Zend Guard Loader(php 5.3)执行受zendenc52.exe保护的脚本的方法

[英]Any way to get Zend Guard Loader (php 5.3) to execute scripts protected with zendenc52.exe

Currently PHP 5.3 hosting environments have to install and use "Zend Guard Loader" extension to process and execute Zend Guard encoded files. 当前,PHP 5.3托管环境必须安装和使用“ Zend Guard Loader”扩展名来处理和执行Zend Guard编码的文件。 I was unable to make it execute files that were encoded for use with Zend Optimizer (PHP 5.2). 我无法使其执行编码用于Zend Optimizer(PHP 5.2)的文件。

Any workaround for this? 任何解决方法?

I don't think so... I am also stuck with using php 5.2 because of that. 我不这么认为...因此,我也坚持使用php 5.2。

If you want to run zend encoded 5.2 scripts using "Zend Guard Loader", you will need to fork out more money and buy the new version to encode the scripts again.... sad. 如果要使用“ Zend Guard Loader”运行zend编码的5.2脚本,则需要花更多的钱并购买新版本来再次对脚本进行编码。

The only way that worked for me was to include php 5.2 file instead of Zend Guards message that is displayed when no zend guard loader found with if condition checking php version. 对我有用的唯一方法是包括php 5.2文件,而不是如果条件检查php版本未找到zend Guard加载程序时显示的Zend Guards消息。 Dirty, but working, yet 2 files still required to be present, but no need to have loader switching them in unprotected code. 脏但可以正常工作的2个文件仍然需要存在,但不需要加载程序以不受保护的代码切换它们。

To answer the Encoding vs. Runtime in Zend Guard/Optimizer/Loader context - they should perfectly match. 要在Zend Guard / Optimizer / Loader上下文中回答“编码与运行时”,它们应该完全匹配。 The accepted answer is incorrect - there is no tweak to execute PHP 5.3 encoded files in Optimizer loaded in PHP 5.2. 接受的答案是不正确的-没有调整以在PHP 5.2中加载的Optimizer中执行PHP 5.3编码的文件。

Maintaining 2 target versions is very easy if you script / batch your encoding process when you have code updates. 如果在更新代码时编写脚本/批处理编码过程,则维护2个目标版本非常容易。 You just execute your source encoding once with zendenc52 and then with zendenc53, giving them different target directories. 您只需使用zendenc52然后使用zendenc53执行一次源编码,即可为它们提供不同的目标目录。

More about that. 关于更多。 PHP 5.3 code is different from 5.2, and you should actually have 2 different branches for your sources matching those versions. PHP 5.3代码不同于5.2,实际上您应该为与这些版本匹配的源提供2个不同的分支。 Old News: http://php.net/manual/en/migration53.php 旧新闻: http : //php.net/manual/en/migration53.php

When testing / staging a Zend Guard encoded application, make sure you test the encoded version (and debug the open sources of course as needed). 在测试/暂存Zend Guard编码的应用程序时,请确保您测试了编码版本(并根据需要调试了开放源代码)。 The reason is simple - encoded files have some overhead of data tables which handles obfuscation, and might change PHP functionality with some advanced PHP syntax. 原因很简单-编码文件具有处理混淆的数据表的一些开销,并且可能会使用某些高级PHP语法更改PHP功能。 If any issue is found in encoded files while testing - it is easy to locate and fix the source. 如果在测试过程中在编码文件中发现任何问题,则很容易找到并修复源。 If you test only the source version and then encode and deploy to your customers - result is unpredictable. 如果仅测试源版本,然后编码并部署到客户,则结果是不可预测的。

As for deployment, when you install/untar/git/svn deploy your PHP files, you can either stick the PHP target version to your releases / downloads / code pushes, so they install in the correct version, or deploy 2 versions in different document root locations, and you can symlink / rewrite to the correct Guarded application version matching the PHP target version 5.2 or 5.3. 至于部署,当您安装/取消/ git / svn部署您的PHP文件时,您可以将PHP目标版本粘贴到您的发行版/下载/代码推送中,以便它们以正确的版本安装,或者在不同的文档中部署两个版本根目录位置,您可以符号链接/重写为与PHP目标版本5.2或5.3匹配的正确的Guarded应用程序版本。

Last but not least. 最后但并非最不重要的。 The supported runtime for Zend Guard is Zend Server. Zend Guard支持的运行时是Zend Server。 It has a community edition and anyone can install it free of charge (or purchase licensed components if needed extra boost and monitoring) on supported OSs, via native package managers for DEB / RPM or installation file (Windows, Mac, Other Linuxes not supported with native package managers). 它具有社区版本,任何人都可以通过DEB / RPM的本机程序包管理器或安装文件(Windows,Mac,其他不支持的Linux)免费在受支持的操作系统上安装(或购买许可的组件,如果需要额外的增强和监视)。本机软件包管理器)。 Zend Server optional Loader component will handle the encoded application files, and it comes with PHP 5.2 and 5.3 branches, so there is no need to manually install Zend Optimizer or Loader on your PHP. Zend Server可选的Loader组件将处理编码的应用程序文件,并且它带有PHP 5.2和5.3分支,因此无需在PHP上手动安装Zend Optimizer或Loader。 Upgrade from PHP 5.2 to 5.3 is easy and native when applications (encoded and open source) were properly migrated. 如果正确迁移了应用程序(编码的和开源的),从PHP 5.2升级到5.3很容易,并且是本机的。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM