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:
我已经使用PHP 5和Apache 2的预编译版本设置了OS X 10.5。我正在尝试设置Zend Debugger,但没有运气。这是我做的:
- 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:我更新了/etc/php.ini文件,添加以下行:
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
我通过系统偏好设置“共享”面板重新启动了Apache
我下载了ZendDebugger-5.2.14-darwin8.6-uni.tar
我创建了目录/ Developer / Extras / PHP并将权限设置为:权限:drwxrwxr-x所有者:root:admin
我将ZendDebugger.so从5_2_x_comp目录复制到/ Developer / Extras / PHP
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.
当我在PHP文件中运行phpinfo()时,我没有提到Zend Debugger。当我从命令行运行php -m时,它显示Zend Debugger已加载。两者都表示他们正在运行相同版本的PHP,并加载相同的INI文件。
Anyone have another suggestion for me to try?
任何人都有另一个建议让我尝试?
4 个解决方案
#1
3
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:
如果我没记错的话,这个问题就是Zend Debugger是针对32位Apache编译的,而Max OS 10.5附带的Apache则编译为64位应用程序。在Zend推出64位版本之前,您有两种选择:
1) Restart Apache manually into 32-bit
1)手动重启Apache到32位
2) Recompile Apache and PHP in 32-bit mode.
2)以32位模式重新编译Apache和PHP。
I haven't actually gotten around to doing either yet, but I think I am leaning to recompiling to avoid future problems.
我还没有真正开始做任何事情,但我认为我倾向于重新编译以避免将来出现问题。
#2
1
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:
以32位模式重新启动就可以了。对于那些希望能够轻松完成此任务的人,这里有一点AppleScript:
do shell script "apachectl stop" with administrator privileges
do shell script "arch -i386 /usr/sbin/httpd" with administrator privileges
It's nice to have sitting somewhere so you can quickly pop into 32-bit mode when needed.
坐在某处可以很好,这样您就可以在需要时快速进入32位模式。
#3
1
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.
Zend发布了适用于Mac OSX的64位版本,因此只需从http://www.zend.com/en/products/studio/downloads下载该文件并正常进行。
You will have to register and answer some questions, but it worked for me.
你必须注册并回答一些问题,但它对我有用。
Good Luck.
#4
0
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:
我也是,小时!!非常感谢!!另外如果出于某种原因你需要在运行它之后重新启动apache / httpd(例如你需要在你的php.ini中进行更改)但是当你运行“sudo arch -i386 / usr / sbin / httpd”时你会得到这个错误:
(48)Address already in use: make_sock: could not bind to address [::]:80
(48)已在使用的地址:make_sock:无法绑定到地址[::]:80
type this in a terminal window: sudo killall httpd
在终端窗口中输入:sudo killall httpd
then "sudo arch -i386 /usr/sbin/httpd" should work fine to restart apache/httpd.
然后“sudo arch -i386 / usr / sbin / httpd”应该可以正常重启apache / httpd。
#1
3
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:
如果我没记错的话,这个问题就是Zend Debugger是针对32位Apache编译的,而Max OS 10.5附带的Apache则编译为64位应用程序。在Zend推出64位版本之前,您有两种选择:
1) Restart Apache manually into 32-bit
1)手动重启Apache到32位
2) Recompile Apache and PHP in 32-bit mode.
2)以32位模式重新编译Apache和PHP。
I haven't actually gotten around to doing either yet, but I think I am leaning to recompiling to avoid future problems.
我还没有真正开始做任何事情,但我认为我倾向于重新编译以避免将来出现问题。
#2
1
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:
以32位模式重新启动就可以了。对于那些希望能够轻松完成此任务的人,这里有一点AppleScript:
do shell script "apachectl stop" with administrator privileges
do shell script "arch -i386 /usr/sbin/httpd" with administrator privileges
It's nice to have sitting somewhere so you can quickly pop into 32-bit mode when needed.
坐在某处可以很好,这样您就可以在需要时快速进入32位模式。
#3
1
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.
Zend发布了适用于Mac OSX的64位版本,因此只需从http://www.zend.com/en/products/studio/downloads下载该文件并正常进行。
You will have to register and answer some questions, but it worked for me.
你必须注册并回答一些问题,但它对我有用。
Good Luck.
#4
0
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:
我也是,小时!!非常感谢!!另外如果出于某种原因你需要在运行它之后重新启动apache / httpd(例如你需要在你的php.ini中进行更改)但是当你运行“sudo arch -i386 / usr / sbin / httpd”时你会得到这个错误:
(48)Address already in use: make_sock: could not bind to address [::]:80
(48)已在使用的地址:make_sock:无法绑定到地址[::]:80
type this in a terminal window: sudo killall httpd
在终端窗口中输入:sudo killall httpd
then "sudo arch -i386 /usr/sbin/httpd" should work fine to restart apache/httpd.
然后“sudo arch -i386 / usr / sbin / httpd”应该可以正常重启apache / httpd。