Best way to develop PHP on OS X

I just got a Mac with OS X (10.6.8). What parameters do I need to make for serious development of PHP, including a debugger?

I am not asking which IDE to use. I'm not sure if the best way to get PHP, including XDebug (or any other professional debugger), works. I heard that the Mac comes preloaded with Apache and PHP. Where can I find documentation about this. Should I just add MySql and work with it? Or should I go for MAMP or XAMPP. What is the use of this installation over the built-in?

I have found many descriptions on how to compile XDebug from scratch. Without them, they worked for me. Is there an easier way to get a debugger that works for OS X?

I am also ready to upgrade my Mac to the latest OS X if that helps.

+4
source share
3 answers

After much more searches and attempts and errors, I found a very good and easy to install solution that works great for me:

  • MacGDBp installed.
  • Installed MAMP .
  • Opened php.ini in /Applications/MAMP/bin/php/php5.3.6/conf/php.ini and uncommented the only line containing the xdebug.so file.
  • Added these 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 is stopped in the first line of PHP.

  • Done!
+4
source

In the era of virtualization

  • a stray box full of ubuntu and zend CE servers
  • zend studio for ide and zend debugger works out of the box
  • you can configure it to use x-debug only apt-get it

this way you will keep your os-x clean and have everything you need in a portable / deployable virtual machine that runs in the background or can be run from any machine that you could use today or tomorrow

+13
source

I use my MacBook Pro to develop PHP every day, including XDebug. I installed it on both Snow Leopard and Lion. It has been a while, but does this link help? http://maestric.com/doc/mac/apache_php_mysql_snow_leopard

For XDebug, what problems do you have? I also wrote this guide on my blog for two easy ways to install PHP extensions on a Mac: http://software.curtisfarnham.com/2011/10/30/how-to-install-php-extensions-in-mac-os -x-lion /

+1
source

Source: https://habr.com/ru/post/1393444/


All Articles