It seems some are having trouble setting up the Zend Debugger so i wrote this after doing some testing to see why people are having this problem. I provide below how to do this in MAMP. This will also get rid of the :8888 at the end of the url as well.
- Download an install the latest version of MAMP
- Install MAMP
- Install MAMP Pro – I recommend this if you work on multiple projects, it is way easier than editing your hosts file and the http.conf every time
- If you use MAMP Pro you will need to use this tutorial
MAMP :
- Go ahead and make sure that MAMP is working, go to http://localhost:8888/MAMP and select phpinfo()
- Check the powered by image, this is the first image, it should look like this
- Go to the MAMP Controller, Select Preferences.
- First lets get ride of the
:8888
at the end of the url, Select “Ports” and then click on the “Set to default” option (this will get rid of the ports on the end of the url)
Will now become: - Select the PHP tab and check Zen Optimizer to use the optimizer – (Optional)
- select “OK” and let the server restart
- First lets get ride of the
- Now go to http://localhost/MAMP and again select the phpinfo() option. Scroll down to the same image an now you should notice the Extension Manager and the Optimizer set (The Extension Manager will only be on here if you chose to check the optimizer in the step above)
Now We can Setup the Debugger :
Now lets do the supposed hard part, lets turn on the debugger.
- Download the latest debugger. You can grab it from here – (i downloaded darwin for my intel based mac book pro)
- Take the file that was extracted and put it in the MAMP directory –
/Applications/MAMP/bin/php5/zend/lib/
(I renamed the unzipped folder to ZendDebugger-5.2.14 so I will be using it through the rest of the tutorial, you can name the file whatever you want) - It is also stated that it can be found in Zend Studio.
- Located:
/Applications/ZendStudio.app/Contents/Resources/Java/plugins/com.zend.php.debug.debugger.macosx_10.6.0.v20140128-2127/resources/php55/ZendDebugger.so
- Located:
- Take the file that was extracted and put it in the MAMP directory –
- The edits are the same for both MAMP and MAMP Pro. The only difference is where the files are located for each. I believe this is the area that is causing the confusion on setting up MAMP with the debugger.
- The MOST important part of setting up the debugger is the folder structure. you will have to rename the version folder to the correct format.
- The original folder name is – 5_2_x_comp – you will need to rename it to – php-5.2.x
- The folder structure should be setup like this
MAMP :
- Open php.ini from
/Applications/MAMP/conf/php5/
– (or 4 if using php4) - Open the php.ini and scroll to the bottom of the file it should look something like this
- After:
MAMP_zend_optimizer_MAMP
Add:
zend_extension_manager.debug_server=/Applications/MAMP/bin/php5/zend/lib/ZendDebugger-5.2.14 zend_debugger.allow_hosts=127.0.0.1 zend_debugger.expose_remotely=always
The php.ini should look like this now
- Save the file and restart the server
- Go to http://localhost/MAMP and choose phpinfo() and you should now see the debugger in the powered by image.
Now if you did everything correct you will now have the debugger working with your MAMP Install.
Hope this was helpful
Spread the love