Search code examples
phpmacososx-leopardphp-5.2zend-debugger

PHP w/ Zend Debugger on OS X 10.5


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?


Solution

  • 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.