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 ?
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
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.";
}
}