Do Not Think!!!

Posted
Filed under 01010101
0. Prepare
MacPorts
http://www.macports.org/

Apple's Xcode Developer Tools
https://developer.apple.com/technologies/tools/

Apple's Command Line Developer Tools
https://developer.apple.com/downloads/


1. Install Apache2 & PHP
[CODE]$ sudo port install apache2
$ sudo port install php5
$ sudo port install php5-mysql
$ sudo port install php5-xdebug
$ sudo port install php5-openssl[/CODE]


2. Configure Apache2
[CODE]$ sudo vi /opt/local/apache2/conf/http.conf

LoadModule php5_module modules/libphp5.so
Include conf/extra/mod_php.conf[/CODE]


3. Install MySQL
[CODE]$ sudo port install mysql56-server [/CODE]


4. Configure MySQL
[CODE]$ sudo vi /opt/local/etc/mysql56/macports-default.cnf

#skip-networking[/CODE]


5. Configure XDebug
[CODE]$ sudo vi /opt/local/etc/php5/php.ini

; NOTE: This line adds the xdebug extension. The macports install will give you the path,
; or may even add this automatically. Be smart, look for a similar line in your config first.
; (Edit: 06/22/2012)
zend_extension="/opt/local/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"

; General config
;Dumps local variables on exception
xdebug.show_local_vars=On
;Dump server variables
xdebug.dump.SERVER=*
;Dump global variables
xdebug.dump_globals=On
xdebug.collect_params=4;

; Tracing
xdebug.auto_trace=On
xdebug.trace_output_dir=/opt/local/php_traces/
xdebug.show_mem_delta=On
xdebug.collect_return=On

; Profiler
xdebug.profiler_enable=1
xdebug.profiler_output_dir=/opt/local/php_traces

; Debugging. You might need to specify your host with some additional options
xdebug.remote_enable=1[/CODE]