Best way to do PHP development on OS X
Solution 1
After a lot more googling and try and error I found a very nice and easy to install solution which works great for me:
- Installed MacGDBp.
- Installed MAMP.
- Opened the
php.ini
at/Applications/MAMP/bin/php/php5.3.6/conf/php.ini
and uncommented the only line containing thexdebug.so
file. -
Added this lines at the end of php.ini
xdebug.remote_enable=1 xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.remote_autostart=1
After restarting apache MacGDBp stoped at the first PHP line.
- Done!
Solution 2
In the age of virtualization
- vagrant box full of ubuntu and zend CE server
- zend studio for ide and zend debugger works out of the box
- you can config it to use x-debug just apt-get it
this way you'll keep your os-x clean and have all the necessary stuff inside a portable/deployable virtual machine that runs on background or can be launched from any machine you might be using today or tomorrow
Solution 3
I use my MacBook Pro for PHP development every day, including XDebug. I've set it up both on Snow Leopard and on Lion. It's been a while, but does this link help you? http://maestric.com/doc/mac/apache_php_mysql_snow_leopard
For XDebug, what problems are you experiencing? I also wrote this guide on my blog for two simple ways of installing PHP extensions on a Mac: http://software.curtisfarnham.com/2011/10/30/how-to-install-php-extensions-in-mac-os-x-lion/
BetaRide
Developer, maker, youtuber. Visit my youtube channel: https://www.youtube.com/channel/UCN8wBEouFtaAyIjjIH2LjJQ
Updated on June 26, 2022Comments
-
BetaRide almost 2 years
I just got a Mac with OS X (10.6.8). What options do I have to do serious PHP developement, including a debugger?
I don't ask about what IDE to use. I'm not sure what is the best way to get PHP including XDebug (or any other professional debugger) working. I heard that the Mac comes with Apache and PHP preinstalled. Where can I find any documentation about this. Should I just add MySql and work with this? Or should I go for MAMP or XAMPP. What would be the benefit of this installs over the built in?
I found a lot of descriptions about how to compile XDebug from scratch. Non of them worked for me. Isn't there an easier way of getting a debugger working for OS X?
I'm also ready to upgrade the Mac to the latest OS X, if this is of any help.