Skip to content

Instantly share code, notes, and snippets.

@hugopereira84
Last active October 23, 2015 15:11
Show Gist options
  • Save hugopereira84/61588c8c0a116a46a4c9 to your computer and use it in GitHub Desktop.
Save hugopereira84/61588c8c0a116a46a4c9 to your computer and use it in GitHub Desktop.
Server Apache Installations
Install composer:
- sudo apt-get -y install curl
- curl -s http://getcomposer.org/installer | php
- sudo mv composer.phar /usr/local/bin/composer
-------------------------------------
Install xdebug / phpdbg (http://phpdbg.com):
- pecl install xdebug
Install lamp package:
sudo apt-get install lamp-server^
Install Other dependencies that will always be needed for develops:
sudo apt-get install php5-dev
Profiling with xdebug:
Normally files goes to folder "/tmp". To remove these files, just do:
- sudo rm -rf cache*
-------------------------------------
Configuration of xebug
- Edite following files:
- "/etc/php5/apache2/php.ini" or "/home/USER_LOGGED/.phpbrew/php/php-5.3.29/etc/php.ini
;xDebug Configuration starts
zend_extension = /home/USER_LOGGED/.phpbrew/php/php-5.3.29/lib/php/extensions/debug-non-zts-20090626/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_autostart=true
xdebug.default_enable=1
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
xdebug.remote_connect_back=1
xdebug.remote_port = 9000
xdebug.profiler_enable = 1
xdebug.profiler_output_name = webgrind.out.%t.%p
;xDebug Configuration ends
OR
[xdebug]
zend_extension=/home/hugopereira/.phpbrew/php/php-5.3.29/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so
xdebug.default_enable=1
xdebug.remote_enable = 1
xdebug.remote_connect_back=1
xdebug.remote_autostart=true
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.profiler_enable = 1
xdebug.profiler_output_name = webgrind.out.%t.%p
xdebug.profiler_output_dir="/tmp/xdebug"
xdebug.auto_trace=1 ; enable tracing
xdebug.trace_format=0
xdebug.show_exception_trace=0
xdebug.show_mem_delta=0 ; memory difference
xdebug.show_local_vars=1
xdebug.max_nesting_level=100
xdebug.var_display_max_data=10000
xdebug.var_display_max_depth=20
[xdebug]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment