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 Pro. 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 are NOT using MAMP Pro please use this tutorial
MAMP PRO :
- Go ahead and make sure that MAMP is working, go to 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 Pro Controller, Select General
- First lets get ride of the :8888 at the end of the url, Click on the “Default Ports” option (this will get rid of the ports on the end of the url)
- Select the PHP tab and check Zen Optimizer to use the optimizer – (Optional)
- select “Apply” and let the server restart, or restart it if it does not automatically
- Now go to 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 -
(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)
- 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 PRO :
- Open the php.ini that is being used by MAMP Pro. Now the problem i had with this was i was using the php.ini from the MAMP Pro directory, that is not the correct one. To get to the correct php.ini you have to be in MAMP Pro and choose File -> Edit Template then the appropriate ini file, i will be using php5.ini since i am using php5.
- Open the php.ini and scroll to the bottom of the file it should look something like this
- You will want to add after the “MAMP_zend_optimizer_MAMP”
- The php.ini should look like this now
- Save the file and restart the server
- Go to 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.