1

I'm using the free version of MAMP. I'm using the latest version of MAMP 2.1.1 with PHP version 5.4.4.

I'm trying to install the Zend Debugger, so I downloaded it from the Zend website, copy it to the following path

/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525

Then I configure the php.ini and write the following lines:

[ZendDebugger]
zend_extension= "/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/ZendDebugger.so"
zend_debugger.allow_hosts= 127.0.0.1
zend_debugger.expose_remotely= always

I did quit MAMP then start it again, but it doesn't work !

So what should I do to configure it correctly ?

HTML Man
  • 937
  • 4
  • 16
  • 40
  • 1
    Can you clarify "doesn't work" .. was there a specific error message, or are you not seeing Zend Debugger in the phpinfo() output? What file did you download from the Zend website .. was it definitely a .so compiled for 64-bit php 5.4 to match your MAMP install and PHP module API version? Looking at the current download versions on the [Zend site](http://www.zend.com/products/studio/downloads), neither seems to match the PHP module API version that you need (20100525). – Stennie Jul 28 '12 at 12:55
  • everything is fine but i could not see it in phpinfo() output. Also I'm using phpstorm so I could not do debugging. Well you are correct, no match that's the problem... well any another solution ? – HTML Man Jul 30 '12 at 14:45
  • 1
    Actually, looks like the Zend version shown on the site is *not* the same as the PHP API (confusingly, just a similar format to what I'd expect). I just downloaded and there are separate `ZendDebugger.so` files for PHP up to 5.3.x, but you are using PHP 5.4.4. So you have a few choices ... download [PHP 5.3.5](http://mamp.info/en/downloads/index.html) for MAMP and use this instead of 5.4. Or try the [ZendServer trial](http://www.zend.com/en/products/server/downloads) which is also PHP 5.3. – Stennie Jul 30 '12 at 15:04
  • yes it was working with 5.3.x but since i update it, it doesn't work at all. Anyway I will wait for a while may be they will create a version fit with php 5.4.4 – HTML Man Jul 30 '12 at 15:53

2 Answers2

0

For anyone facing problems with the zend debugger ini settings.. After I added the last line below to the Zend section in php.ini I finally got it working

[Zend]
zend_extension="/Applications/MAMP/bin/php/php5.2.17/lib/php/extensions/Zend/ZendDebugger.so"
zend_debugger.allow_hosts=127.0.0.1/32,192.168.1.1/16
zend_debugger.expose_remotely=always
zend_debugger.allow_tunnel=127.0.0.1/32
Marcel Verwey
  • 441
  • 5
  • 6
0

This should do the trick if you are using only the Debugger.

[Zend]
zend_extension=/Applications/MAMP/bin/php/php5.5.10/lib/php/extensions/no-debug-non-zts-20121212/ZendDebugger.so
zend_debugger.allow_hosts=127.0.0.1/32,192.168.1.1/16
zend_debugger.expose_remotely=always
zend_debugger.allow_tunnel=127.0.0.1/32

Of course use appropriate path to the ZendDebugger.so

You need at least Zend Debugger v6.0.0 to get it work. If you download debugger from Zend download page, it will fail. It's an outdated version of debugger.

Latest Zend debugger is available in Zend Studio app, for example:

/Applications/ZendStudio.app/Contents/Resources/Java/plugins/com.zend.php.debug.debugger.macosx_10.6.0.v20140128-2127/resources/php55/ZendDebugger.so

Just grab the latest debugger from Zend Studio app and copy it to the appropriate location in MAMP.

MAMP, Zend Studio and Zend Debugger are really powerful set for debugging for improving performance of your code.

Please note, you need the dummy.php file also on your web root.

You can make it byself:

<?php
@ini_set('zend_monitor.enable', 0);
if(@function_exists('output_cache_disable')) {
    @output_cache_disable();
}
if(isset($_GET['debugger_connect']) && $_GET['debugger_connect'] == 1) {
    if(function_exists('debugger_connect'))  {
        debugger_connect();
        exit();
    } else {
        echo "No connector is installed.";
    }
}
D.A.H
  • 858
  • 2
  • 9
  • 19