apache 无法安装 zend 调试器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/961110/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 17:43:11  来源:igfitidea点击:

Can't install zend debugger

phpapachezend-debugger

提问by MrAn3

I'm trying to install zend debugger in my Ubuntu 9.04 machine, I've done it in win. but not in linux, I hope you could help me, this is what I've done:

我正在尝试在我的 Ubuntu 9.04 机器上安装 zend 调试器,我已经在 win 中完成了。但不是在 linux 中,我希望你能帮助我,这就是我所做的

1)Copied the file ZendDebugger.so to /etc/php5/apache2 (didn't choose this folder for anything in special).

1) 将 ZendDebugger.so 文件复制到 /etc/php5/apache2 (没有特别选择这个文件夹)。

2)Added this lines to php.ini:

2) 在 php.ini 中加入了这几行:

zend_extension="/etc/php5/apache2/ZendDebugger.so" zend_debugger.allow_hosts=127.0.0.1,127.0.1.1,localhost,*
zend_debugger.expose_remotely=always

zend_extension="/etc/php5/apache2/ZendDebugger.so" zend_debugger.allow_hosts=127.0.0.1,127.0.1.1,localhost,*
zend_debugger.expose_remotely=always

I've also tried without quotes(zend_extension=/etc/php5/apache2/ZendDebugger.so)

我也试过不加引号(zend_extension=/etc/php5/apache2/ZendDebugger.so)

3)Copied file dummy.php to /var/www

3) 将文件 dummy.php 复制到 /var/www

And then restarted Apache but I didn't see the information about Zend Debugger in the phpinfo(), the only related thing I found there was report_zend_debug On.

然后重启了Apache但是在phpinfo()里面没有看到关于Zend Debugger的信息,我找到的唯一相关的东西是report_zend_debug On。

Thanks in advance

提前致谢

回答by Elzo Valugi

I found much more easy to install Xdebugin my Ubuntu machine.

我发现在我的 Ubuntu 机器上安装Xdebug更容易。

回答by voravor

sudo mv /etc/php5/apache2/ZendDebugger.so /usr/lib/php5/20060613/ZendDebugger.so

This is where your memcache.so, apc.so, etc. are located. Unless you modified your php extensions directory that is where new exts should go.

这是你的memcache.soapc.so等的位置。除非你修改了你的 php 扩展目录,这才是新扩展应该去的地方。

In php.ini:

php.ini

zend_extension=/usr/lib/php5/20060613/ZendDebugger.so

cd to that directory and chmod a-x ZendDebugger.soto remove executable bits from the .so.

cd 到该目录并chmod a-x ZendDebugger.so.so.

sudo /etc/init.d/apache2 stop

In another terminal window, tail -f /var/log/error.logand clear console so it is easy to see new log entries coming in (cmd-k on macos).

在另一个终端窗口中,tail -f /var/log/error.log清除控制台,以便很容易看到新的日志条目(macos 上的 cmd-k)。

Then:

然后:

sudo /etc/init.d/apache2 start

If there are no errors in error.log, check phpinfo()and see if the debugger section shows up.

如果 中没有错误error.log,请检查phpinfo()并查看调试器部分是否出现。

You might get errors in the configuration of other php extensions that occur further up in php.ini(e.g., xcache or eaccellerator) that will make loading stuff further down in php.iniproblematic.

您可能会在其他 php 扩展的配置中遇到错误php.ini(例如,xcache 或 eaccellerator),这将使加载内容进一步出现php.ini问题。

This is a baseline setup and should work if there are no other problems.

这是一个基线设置,如果没有其他问题应该可以工作。

回答by Norm 2782

You can also try to install Zend Server Community EditionYou'll get Zend Debugger enabled by default, along with some other nice features. There is a link to the deb repository available through the download page.

您还可以尝试安装Zend Server Community Edition您将默认启用 Zend Debugger,以及其他一些不错的功能。下载页面有一个指向 deb 存储库的链接。

回答by cmsjr

I followed the same steps that you did with the same result. In the end the problem was that I was trying to load a 32bit binary with apache running in 64bit mode base (as described in this post) I was able to get it running immediately by doing the following.

我按照与您相同的步骤进行了相同的操作。最终的问题是,我试图加载在64位模式的基础阿帕奇运行32位二进制文件(如本描述)我能获得通过执行以下操作会立即运行。

  1. stopping apache
  2. executing sudo arch -i386 /usr/sbin/httpd
  3. restarting apache.
  1. 停止阿帕奇
  2. 执行 sudo arch -i386 /usr/sbin/httpd
  3. 重启阿帕奇。

After replacing the 32bit binary with the 64bit binary everything worked as expected with no special apache handling. There was also some facepalming involved, but it did not affect the overall outcome.

用 64 位二进制文​​件替换 32 位二进制文​​件后,一切都按预期工作,没有特殊的 apache 处理。还涉及一些面部表情,但这并没有影响整体结果。