views:

1823

answers:

4

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
  • I copied ZendDebugger.so from the 5_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?

+3  A: 

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.

Barrett Conrad
+1  A: 

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:

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.

inxilpro
A: 

My god, I've spend HOURS on this - and starting in 32bit mode was the easy answer, thanks!

A: 

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.