duanaiguang1960 2014-08-26 05:01
浏览 100

如何在Xampp上安装Zend Guard Loader

I have been using a software which files are encoded by Zend Guard. Since PHP 5.3 + versions don't support Zend Optimizer hence I have to install Zend Guard Loader to run that application on my windows xampp installation.

I downloaded Zend guard loader and copied to xampp folder.Then I edited the following lines to php.ini file.

zend_extension ="E:\xampp\ZendGuardLoader\php-5.4.x\ZendLoader.dll"
zend_loader.enable=1

Then restarted the xampp but it was giving php5.dll missing error then I downloaded php5.dll file from internet and uploaded to xampp/php folder and edited following file xampp\apache\conf\extra\httpd-xampp.conf here I edited this line

LoadFile "/xampp/php/php5ts.dll"

to LoadFile "/xampp/php/php5.dll"

then the php5.dll error gone and the following error occurred:

"the procedure entry point zend_new_interned_string could not be located in the dynamic link library E:\xampp\ZendGuardLoader\php-5.4.x\ZendLoader.dll"

When I tried to search on internet then found that this is the issue with 'Thread Safety' is enabled in xampp php. I don't know how to disable 'Thread Safety' or how to use 'Non Thread Safety' php version with xampp.

Please help me to install Zend Guard Loader on Windows 8 os Xampp 1.8.1 with php 5.4.x

  • 写回答

2条回答 默认 最新

  • duanbi3385 2014-11-12 17:26
    关注

    So, I had this same issue.

    XAMPP (as far as version 3.2.1) comes bundled with Thread Safe PHP compilation. This is php binaries are compiled using a flag to force "Tread Safe", so, it can't be switched back on the same binaries.

    You need to change the binaries of XAMP for those Non Tread Safe (NTS) compiled.

    I followed this guide for replacing PHP in XAMP to use NTS. The guide explains how to enable FastCGI and Zend OPcache, so if you copy paste the steps, you should have XAMP run PHP on FastCGI mode. The relevant steps are:

    1. Identify the version of Apache server that is running. [..]
    2. Download the latest PHP binaries for windows. Choose the non-thread-safe (you might choose a newer version of php) [...] Create a new folder for the new version of PHP (ex. c:\xampp\php56-nts ).
    3. Edit the Apache configuration file (ex: c:\xampp\apache\apache\conf\extra\ httpd-xampp.conf ) and replace the paths in the php5 module configuration you may need to change the name of the .dll
    4. As php binaries downloaded from php.net can be used for developpment or for production, you need to create a php.ini according to your needs (there are 2 templates in the folder you can use to begin with: php.ini-development and php.ini-production )

    With this, basically you have XAMPP to run PHP's NTS version. Afther that, you can install Zend Guard Loader as the guide says. Basically:

    1. Download the Zend Guard Loader binary
    2. Locate the ZendLoader.dll file and paste it inside the library path of php for xampp. Get the path.
    3. Configure php.ini to use ZendLoader; Add

      zend_extension=< full_path_to_ZendLoader.dll>
      zend_extension=< full_path_to_opcache.dll>

    4. Add any other optional configuration. Restart Apache and it should restart with the NTS version of PHP. You can test this with localhost/xampp/phpinfo.php

    评论

报告相同问题?

悬赏问题

  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥15 绘制多分类任务的roc曲线时只画出了一类的roc,其它的auc显示为nan
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?