我试图用PHP5.3的ZendGuard 5.5锁定一些PHP5.3,并且在PHP5.2中没有任何问题。我可以在未加密的情况下运行代码,但是当我添加加密时,它会引发以下错误:
../app/code/local/MyModule/TestModule/Model/Mysql4/Setup.php中的致命错误:在第0行的中找不到'Zend_Log‘类
如果我开始用未加密版本替换问题文件,则错误转移到模块中的其他加密文件。
下面是放置在每个PHP文件顶部的代码,以支持许可证支持。这段代码实际上正在为另一个新模块工作,该模块是最近编写的。
if(zend_loader_file_encoded()) {
if(!zend_loader_enabled() || !zend_get_id()) {
exit('<strong>Error:</strong> The Zend Optimizer loader is not enabled! <br /><br />To enable it, please modify the following in your php.ini: zend_optimizer.enable_loader = on.');
}
else if(!zend_loader_file_licensed()){
$licensePath = Mage::getModuleDir('etc', 'MyModule_TestModule'). DS . 'license' . DS . 'license.zl';
if(!file_exists($licensePath)) {
exit("<strong>Error:</strong> No license file was found. Your license file should be located in: $licensePath. <br /><br />If you do not have a license, you need to obtain one from the Dev Team by contacting: <a href=\"mailto:devteam@site.com\">devteam@site.com</a>.");
}
if(!zend_loader_install_license($licensePath)) {
exit('<strong>Error:</strong> An error occurred while loading your license file. Please contact support at <a href="mailto:devteam@site.com">devteam@site.com</a>.');
}
}
}我已经搜遍了很多地方,也想不出这是我的命。任何帮助都将不胜感激。
发布于 2014-03-26 03:13:35
在用ZendGuard编码一些代码之后,我遇到了类似的“未找到类”错误。
对变量、函数和类名的混淆重新编码,禁用了这个问题。
ZendGuard编码器似乎无法处理某些不寻常但合法的PHP语法。
https://stackoverflow.com/questions/13469598
复制相似问题