Skip to content

Instantly share code, notes, and snippets.

@renatorocha1
Forked from hofmannsven/README.md
Created February 11, 2016 13:34
Show Gist options
  • Save renatorocha1/60218df2eafd9aec6606 to your computer and use it in GitHub Desktop.
Save renatorocha1/60218df2eafd9aec6606 to your computer and use it in GitHub Desktop.
Running PHP (v5.6.10) with Xdebug (v2.2.7) under MAMP (v3.4) and PhpStorm (v10.0.3) on OS X (v10.11.2)

PHP and Xdebug

Install Xdebug via Homebrew

  1. brew search xdebug
  2. brew install homebrew/php/php56-xdebug

Xdebug and VVV

Toggle Xdebug within vagrant ssh: xdebug_on | xdebug_off

Xdebug and Mamp

Attention: Take care of profiling logs: /Applications/MAMP/tmp

Locate php.ini

php -i | grep "Loaded Configuration File" or php --ini

Locate PHP

which php

List Extensions

php -m

Locate extensions directory

php -ini|grep extension_dir

SMTP/Mail

php -i
php -v
php -m
export MAMP_PHP=/Applications/MAMP/bin/php/php5.6.10/bin
export PATH="$MAMP_PHP:$PATH"
[mail function]
sendmail_path =/usr/sbin/sendmail -t -i -f yourname@example.com
[xdebug]
zend_extension="/Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so"
xdebug.remote_enable=true
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir=/Applications/MAMP/tmp
xdebug.idekey=PHPSTORM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment