OS X 10.5 上带 Zend 调试器的 PHP
我已经使用 PHP 5 和 Apache 2 的预编译版本设置了 OS X 10.5。我正在尝试设置 Zend 调试器,但没有成功。 这就是我所做的:
- 我下载了
ZendDebugger-5.2.14-darwin8.6-uni.tar
- 我创建了目录
/Developer/Extras/PHP
并将权限设置为:- 权限:
drwxrwxr-x
- 所有者:
root:admin
- 权限:
- 我从
5_2_x_comp
复制了ZendDebugger.so
目录到/Developer/Extras/PHP
我更新了
/etc/php.ini
文件,添加了以下几行:zend_extension=/Developer/Extras/PHP/ZendDebugger.so zend_debugger.expose_remotely=始终 zend_debugger.connector_port=10013 zend_debugger.allow_hosts=127.0.0.1
我通过系统偏好设置“共享”面板重新启动了 Apache
当我在 PHP 文件中运行 phpinfo() 时,我没有提到 Zend 调试器。 当我从命令行运行 php -m 时,它显示 Zend 调试器已加载。 两者都声明它们运行相同版本的 PHP,并加载相同的 INI 文件。
有人有其他建议让我尝试吗?
I have OS X 10.5 set up with the precompiled versions of PHP 5 and Apache 2. I'm trying to set up the Zend Debugger, but with no luck. Here's what I did:
- I downloaded
ZendDebugger-5.2.14-darwin8.6-uni.tar
- I created the directory
/Developer/Extras/PHP
and set the permissions to:- Permissions:
drwxrwxr-x
- Owner:
root:admin
- Permissions:
- I copied
ZendDebugger.so
from the5_2_x_comp
directory to/Developer/Extras/PHP
I updated
/etc/php.ini
file, adding the following lines:zend_extension=/Developer/Extras/PHP/ZendDebugger.so zend_debugger.expose_remotely=always zend_debugger.connector_port=10013 zend_debugger.allow_hosts=127.0.0.1
I restarted Apache via the System Preferences "Sharing" panel
When I run phpinfo()
within a PHP file, I get no mention of the Zend Debugger. When I run php -m
from the command line, it shows the Zend Debugger is loaded. Both state that they're running the same version of PHP, and loading the same INI file.
Anyone have another suggestion for me to try?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果我没记错的话,这个问题是由于 Zend Debugger 是为 32 位 Apache 编译的,而 Max OS 10.5 附带的 Apache 是为 64 位应用程序编译的。 在 Zend 推出 64 位版本之前,您有两个选择:
1) 手动重启Apache进入32位
2) 以32位模式重新编译Apache和PHP。
我实际上还没有抽出时间去做这两件事,但我想我倾向于重新编译以避免将来出现问题。
If I remember correctly, this problem is do to the fact that the Zend Debugger is compiled for 32-bit Apache while the Apache that comes with Max OS 10.5 is compiled as 64-bit application. Until Zend comes out with a 64-bit version, you have two options:
1) Restart Apache manually into 32-bit
2) Recompile Apache and PHP in 32-bit mode.
I haven't actually gotten around to doing either yet, but I think I am leaning to recompiling to avoid future problems.
以 32 位模式重新启动就成功了。 对于那些希望能够轻松完成此操作的人,这里有一些 AppleScript:
很高兴坐在某个地方,这样您就可以在需要时快速进入 32 位模式。
Restarting in 32-bit mode did the trick. For those of you who want to be able to do this easily, here's a little bit of AppleScript:
It's nice to have sitting somewhere so you can quickly pop into 32-bit mode when needed.
Zend 发布了适用于 Mac OSX 的 64 位版本,因此只需从 http://www.zend.com 下载文件即可。 zend.com/en/products/studio/downloads 并照常进行。
您必须注册并回答一些问题,但这对我有用。
祝你好运。
Zend released the 64bit version for Mac OSX, so just download the file from http://www.zend.com/en/products/studio/downloads and procede as normal.
You will have to register and answer some questions, but it worked for me.
Good Luck.
我也是,小时!! 非常感谢!!
另外,如果由于某种原因你需要在运行此命令后重新启动 apache/httpd(例如,你需要在 php.ini 中进行更改),但是当你运行“sudo arch -i386 /usr/sbin/httpd”时,你会得到这个错误:
(48)地址已在使用中:make_sock:无法绑定到地址 [::]:80
在终端窗口中键入:
sudo Killall httpd
然后“sudo arch -i386 /usr/sbin/httpd”应该可以很好地重新启动 apache/httpd。
Me too, HOURS!! Thanks so much!!
Also if for some reason you need to restart apache/httpd after running this (e.g. you need to make a change in your php.ini) but when you run "sudo arch -i386 /usr/sbin/httpd" you're getting this error:
(48)Address already in use: make_sock: could not bind to address [::]:80
type this in a terminal window:
sudo killall httpd
then "sudo arch -i386 /usr/sbin/httpd" should work fine to restart apache/httpd.