Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. @DaRaFF DaRaFF revised this gist Nov 6, 2012. 1 changed file with 13 additions and 2 deletions.
    15 changes: 13 additions & 2 deletions ubuntu-php-development-environment.md
    Original file line number Diff line number Diff line change
    @@ -225,8 +225,19 @@ source ~/.bashrc
    * Set a breakpoint and run a console command

    ##PHPStorm Config
    * for PHPUnit Code Completion add PHPUnit path under file->settings-directories
    * Usually it’s stored in `/usr/share/php/PHPUnit`
    ```shell
    #for PHPUnit Code Completion add PHPUnit path under file->settings->directories
    #Usually it’s stored in
    /usr/share/php/PHPUnit

    #for PHPUnit Skeleton Generator add phpunit-skelgen under file->settings->ProjectSettings->PHP->PHPUnit->SkeletonGenerator
    #Usually it's stored in
    /usr/bin/phpunit-skelgen
    ```



    /usr/bin/phpunit-skelgen



  2. @DaRaFF DaRaFF revised this gist Nov 6, 2012. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions ubuntu-php-development-environment.md
    Original file line number Diff line number Diff line change
    @@ -146,6 +146,10 @@ sudo pear update-channels
    sudo pear upgrade-all
    sudo pear install --alldeps phpunit/PHPUnit
    sudo pear install --force --alldeps phpunit/PHPUnit

    #phpunit Skeleton Generator
    sudo pear config-set auto_discover 1
    sudo pear install pear.phpunit.de/PHPUnit_SkeletonGenerator
    ```

    <a name="phpstorm"></a>
  3. @DaRaFF DaRaFF revised this gist Nov 5, 2012. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions ubuntu-php-development-environment.md
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,7 @@ I hope it's a help also for you!
    * [mysql](#mysql)
    * [sqlite](#sqlite)
    * [gmagick](#gmagick)
    * [curl](#curl)
    * PHP Environment
    * [PHP5](#php)
    * [PEAR](#pear)
    @@ -91,6 +92,12 @@ sudo pecl install gmagick-beta
    extension=gmagick.so
    ```

    <a name="curl"></a>
    ##curl
    ```shell
    sudo apt-get install curl
    ```

    #Installation PHP Environment
    <a name="php"></a>
    ##PHP5
  4. @DaRaFF DaRaFF renamed this gist Nov 3, 2012. 1 changed file with 0 additions and 0 deletions.
  5. @DaRaFF DaRaFF renamed this gist Nov 3, 2012. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. @DaRaFF DaRaFF revised this gist Nov 3, 2012. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    #Introduction
    If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system.
    I did it already a few times and i decided to write down the steps for a typical web developer stack with php.
    This is for a developer machine and not for live environment!

    I hope it's a help also for you!

    @@ -216,6 +217,11 @@ source ~/.bashrc
    * for PHPUnit Code Completion add PHPUnit path under file->settings-directories
    * Usually it’s stored in `/usr/share/php/PHPUnit`






    <a name="apache2-config-example"></a>
    #Apache2 config example
    Assume you want to have your project in `/home/username/my_webside`
  7. @DaRaFF DaRaFF revised this gist Nov 3, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -141,11 +141,11 @@ sudo pear install --force --alldeps phpunit/PHPUnit
    ```

    <a name="phpstorm"></a>
    ##PHP Storm IDE
    * Download and install PHP Storm - http://www.jetbrains.com/phpstorm/
    * Install Sun JDK - http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
    * increase file watching limit (http://confluence.jetbrains.net/display/IDEADEV/Inotify+Watches+Limit)

    ##PHP Storm IDE
    ```shell
    #add line to /etc/sysctl.conf
    fs.inotify.max_user_watches = 524288
  8. @DaRaFF DaRaFF revised this gist Nov 3, 2012. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -130,6 +130,7 @@ sudo pear install PHP_CodeSniffer
    #necessary if you already have installed phpunit via apt-get
    sudo apt-get remove phpunit

    #install newest version of phpunit
    sudo pear channel-discover pear.phpunit.de
    sudo pear channel-discover pear.symfony-project.com
    sudo pear channel-discover components.ez.no
    @@ -140,11 +141,12 @@ sudo pear install --force --alldeps phpunit/PHPUnit
    ```

    <a name="phpstorm"></a>
    * Download and install PHP Storm - http://www.jetbrains.com/phpstorm/
    * Install Sun JDK - http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
    * increase file watching limit (http://confluence.jetbrains.net/display/IDEADEV/Inotify+Watches+Limit)

    ##PHP Storm IDE
    ```shell
    #Download and install PHP Storm - http://www.jetbrains.com/phpstorm/
    #Install Sun JDK - http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
    #increase file watching limit (http://confluence.jetbrains.net/display/IDEADEV/Inotify+Watches+Limit)
    #add line to /etc/sysctl.conf
    fs.inotify.max_user_watches = 524288

  9. @DaRaFF DaRaFF revised this gist Nov 3, 2012. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -218,6 +218,7 @@ source ~/.bashrc
    #Apache2 config example
    Assume you want to have your project in `/home/username/my_webside`

    ```shell
    # Change user/group of Apache2
    # edit /etc/apache2/apache2.conf
    User <username>
  10. @DaRaFF DaRaFF revised this gist Nov 3, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -115,7 +115,7 @@ sudo pear install phing/phing

    #Installation PHP QA Environment
    <a name="php-codesniffer"></a>
    ##CodeSiffer
    ##CodeSniffer
    ```shell
    sudo pear install PHP_CodeSniffer
    ```
  11. @DaRaFF DaRaFF revised this gist Nov 3, 2012. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -17,6 +17,7 @@ I hope it's a help also for you!
    * [PHP5](#php)
    * [PEAR](#pear)
    * [Phing](#phing)
    * PHP QA Environment
    * [PHP Codesniffer](#php-codesniffer)
    * [PHPUnit](#phpunit)
    * [PHPStorm IDE](#phpstorm)
    @@ -112,7 +113,7 @@ sudo pear channel-discover pear.phing.info
    sudo pear install phing/phing
    ```

    #Installation of QA Environment
    #Installation PHP QA Environment
    <a name="php-codesniffer"></a>
    ##CodeSiffer
    ```shell
  12. @DaRaFF DaRaFF revised this gist Nov 3, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -71,7 +71,7 @@ sudo apt-get install php5-mysql
    ```

    <a name="sqlite"></a>
    ##PHP SQLite
    ##SQLite
    ```shell
    sudo apt-get install sqlite3 php5-sqlite

    @@ -91,7 +91,7 @@ extension=gmagick.so

    #Installation PHP Environment
    <a name="php"></a>
    ##PHP
    ##PHP5
    ```shell
    sudo apt-get install php5-cli php5-common php-apc php-pear php5-xdebug php5-curl php5
    sudo apt-get install php5-xsl
  13. @DaRaFF DaRaFF revised this gist Nov 3, 2012. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -20,9 +20,10 @@ I hope it's a help also for you!
    * [PHP Codesniffer](#php-codesniffer)
    * [PHPUnit](#phpunit)
    * [PHPStorm IDE](#phpstorm)
    * [php.ini settings](#php-ini)
    * [How to debug with XDebug and PHPStorm on Firefox and command line](#debugging-with-phpstorm)
    * [Apache2 config example](#apache2-config-example)
    * Other
    * [php.ini settings](#php-ini)
    * [How to debug with XDebug and PHPStorm on Firefox and command line](#debugging-with-phpstorm)
    * [Apache2 config example](#apache2-config-example)

    #Install General Environment
    <a name="git"></a>
  14. @DaRaFF DaRaFF revised this gist Nov 3, 2012. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,6 @@ I did it already a few times and i decided to write down the steps for a typical
    I hope it's a help also for you!

    #Installation stack
    ////////* [PHP Storm](#phpstorm)
    * General Environment
    * [git / github](#git)
    * [memcache](#memcache)
  15. @DaRaFF DaRaFF revised this gist Nov 3, 2012. 1 changed file with 19 additions and 2 deletions.
    21 changes: 19 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -5,8 +5,25 @@ I did it already a few times and i decided to write down the steps for a typical
    I hope it's a help also for you!

    #Installation stack
    * [PHP Storm](#phpstorm)
    * [Git / Github](#git)
    ////////* [PHP Storm](#phpstorm)
    * General Environment
    * [git / github](#git)
    * [memcache](#memcache)
    * [apache2](#apache2)
    * [nginx](#nginx)
    * [mysql](#mysql)
    * [sqlite](#sqlite)
    * [gmagick](#gmagick)
    * PHP Environment
    * [PHP5](#php)
    * [PEAR](#pear)
    * [Phing](#phing)
    * [PHP Codesniffer](#php-codesniffer)
    * [PHPUnit](#phpunit)
    * [PHPStorm IDE](#phpstorm)
    * [php.ini settings](#php-ini)
    * [How to debug with XDebug and PHPStorm on Firefox and command line](#debugging-with-phpstorm)
    * [Apache2 config example](#apache2-config-example)

    #Install General Environment
    <a name="git"></a>
  16. @DaRaFF DaRaFF revised this gist Nov 3, 2012. 1 changed file with 37 additions and 29 deletions.
    66 changes: 37 additions & 29 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -8,20 +8,7 @@ I hope it's a help also for you!
    * [PHP Storm](#phpstorm)
    * [Git / Github](#git)

    #Installation General Environment
    <a name="phpstorm"></a>
    ##PHP Storm
    ```shell
    #Download and install PHP Storm - http://www.jetbrains.com/phpstorm/
    #Install Sun JDK - http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
    #increase file watching limit (http://confluence.jetbrains.net/display/IDEADEV/Inotify+Watches+Limit)
    #add line to /etc/sysctl.conf
    fs.inotify.max_user_watches = 524288

    #apply changes
    sudo sysctl -p
    ```

    #Install General Environment
    <a name="git"></a>
    ##git
    ```shell
    @@ -32,20 +19,22 @@ git config --global color.status auto

    #Manual on how to install ssh keys on github http://help.github.com/linux-set-up-git/
    ```

    <a name="memcache"></a>
    ##memcache
    ```shell
    sudo apt-get install memcached
    sudo apt-get install php5-memcache
    ```

    <a name="apache2"></a>
    ##apache2
    ```shell
    sudo apt-get install apache2
    sudo a2enmod rewrite
    sudo apt-get install libapache2-mod-php5
    ```

    <a name="nginx"></a>
    ##nginx
    ```shell
    sudo apt-get install nginx php5-fpm
    @@ -57,20 +46,23 @@ sudo /etc/init.d/php5-fpm restart
    sudo service nginx restart
    ```

    <a name="mysql"></a>
    ##mysql
    ```shell
    sudo apt-get install mysql-server
    sudo apt-get install php5-mysql
    ```

    <a name="sqlite"></a>
    ##PHP SQLite
    ```shell
    sudo apt-get install php5-sqlite
    sudo apt-get install sqlite3 php5-sqlite

    #comment in /etc/php5/conf.d/sqlite.ini
    extension=sqlite.so
    ```

    <a name="gmagick"></a>
    ##gmagick
    ```shell
    sudo apt-get install graphicsmagick libgraphicsmagick1-dev
    @@ -81,26 +73,30 @@ extension=gmagick.so
    ```

    #Installation PHP Environment
    <a name="php"></a>
    ##PHP
    ```shell
    sudo apt-get install php5-cli php5-common php-apc php-pear php5-xdebug php5-curl php5
    sudo apt-get install php5-xsl
    sudo apt-get install php5-intl
    ```

    <a name="pear"></a>
    ##PEAR
    ```shell
    sudo pear channel-update PEAR
    sudo pear upgrade PEAR
    ```

    <a name="phing"></a>
    ##PHING
    ```shell
    sudo pear channel-discover pear.phing.info
    sudo pear install phing/phing
    ```

    #Installation of QA Environment
    <a name="php-codesniffer"></a>
    ##CodeSiffer
    ```shell
    sudo pear install PHP_CodeSniffer
    @@ -110,6 +106,7 @@ sudo pear install PHP_CodeSniffer
    * [public](https://github.com/opensky/Symfony2-coding-standard)
    * [private](https://github.com/nzzdev/Symfony2-coding-standard/blob/master/README.md)

    <a name="phpunit"></a>
    ##PHPUnit
    ```shell
    #necessary if you already have installed phpunit via apt-get
    @@ -124,18 +121,22 @@ sudo pear install --alldeps phpunit/PHPUnit
    sudo pear install --force --alldeps phpunit/PHPUnit
    ```

    #Configuration

    ##Apache2

    Assume you want to have your projects in /home/your_username/eos
    <a name="phpstorm"></a>
    ##PHP Storm IDE
    ```shell
    # Change user/group of Apache2
    # edit /etc/apache2/apache2.conf
    User >your_username>
    Group <your_usergroup>
    #Download and install PHP Storm - http://www.jetbrains.com/phpstorm/
    #Install Sun JDK - http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
    #increase file watching limit (http://confluence.jetbrains.net/display/IDEADEV/Inotify+Watches+Limit)
    #add line to /etc/sysctl.conf
    fs.inotify.max_user_watches = 524288

    #apply changes
    sudo sysctl -p
    ```

    #Configuration

    <a name="php-ini"></a>
    ##PHP
    * Change this settings in /etc/php5/cli/php.ini for for *all webservers*
    * Change this settings in /etc/php5/apache2/php.ini if you have installed *apache2*
    @@ -156,7 +157,10 @@ default_charset = utf8
    xdebug.max_nesting_level = 1000
    ```

    <a name="debugging-with-phpstorm"></a>
    #Debugging with XDebug on Browser and Command line

    The example is made for PHPStorm IDE with Apache2 webserver. But other IDE's or webservers should work in a similar way.
    ##Configuration
    ```shell
    #Edit /etc/php5/cli/conf.d/xdebug.ini
    @@ -182,7 +186,7 @@ source ~/.bashrc
    ##Debugging via Firefox
    * Firefox: Click on ‘StartXDebug Session’ Symbol on bottom right
    * PHPStorm: Click on Run->Start Listen PHP Debug Connections
    * Set a breakpoint and do call via firefox browser
    * PHPStorm: Set a breakpoint and do call via firefox browser

    ##Debugging via Console
    * PHPStorm: Click on Run->Start Listen PHP Debug Connections
    @@ -192,10 +196,14 @@ source ~/.bashrc
    * for PHPUnit Code Completion add PHPUnit path under file->settings-directories
    * Usually it’s stored in `/usr/share/php/PHPUnit`

    <a name="apache2-config-example"></a>
    #Apache2 config example
    ```shell
    #Assume you want to have your project in
    /home/username/my_webside
    Assume you want to have your project in `/home/username/my_webside`

    # Change user/group of Apache2
    # edit /etc/apache2/apache2.conf
    User <username>
    Group <usergroup>

    #Add entry to /etc/hosts
    127.0.0.1 www.my_webside.lo
  17. @DaRaFF DaRaFF revised this gist Nov 2, 2012. 1 changed file with 7 additions and 4 deletions.
    11 changes: 7 additions & 4 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -137,9 +137,9 @@ Group <your_usergroup>
    ```

    ##PHP
    * Add this settings in /etc/php5/cli/php.ini for for *all webservers*
    * Add this settings in /etc/php5/apache2/php.ini if you have installed *apache2*
    * Add this settings in /etc/php5/fpm/php.ini if you have installed *nginx and fpm*
    * Change this settings in /etc/php5/cli/php.ini for for *all webservers*
    * Change this settings in /etc/php5/apache2/php.ini if you have installed *apache2*
    * Change this settings in /etc/php5/fpm/php.ini if you have installed *nginx and fpm*

    ```shell
    memory_limit = 512m
    @@ -148,8 +148,11 @@ html_errors = On
    post_max_size = 32m
    upload_max_filesize = 32m
    default_charset = utf8
    ```

    #Edit /etc/php5/cli/conf.d/xdebug.ini
    * Edit /etc/php5/cli/conf.d/xdebug.ini

    ```shell
    xdebug.max_nesting_level = 1000
    ```

  18. @DaRaFF DaRaFF revised this gist Nov 2, 2012. 1 changed file with 1 addition and 14 deletions.
    15 changes: 1 addition & 14 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -24,7 +24,6 @@ sudo sysctl -p

    <a name="git"></a>
    ##git

    ```shell
    sudo apt-get install git
    git config --global color.branch auto
    @@ -35,22 +34,19 @@ git config --global color.status auto
    ```

    ##memcache

    ```shell
    sudo apt-get install memcached
    sudo apt-get install php5-memcache
    ```

    ##apache2

    ```shell
    sudo apt-get install apache2
    sudo a2enmod rewrite
    sudo apt-get install libapache2-mod-php5
    ```

    ##nginx

    ```shell
    sudo apt-get install nginx php5-fpm

    @@ -62,14 +58,12 @@ sudo service nginx restart
    ```

    ##mysql

    ```shell
    sudo apt-get install mysql-server
    sudo apt-get install php5-mysql
    ```

    ##PHP SQLite

    ```shell
    sudo apt-get install php5-sqlite

    @@ -78,7 +72,6 @@ extension=sqlite.so
    ```

    ##gmagick

    ```shell
    sudo apt-get install graphicsmagick libgraphicsmagick1-dev
    sudo pecl install gmagick-beta
    @@ -89,15 +82,13 @@ extension=gmagick.so

    #Installation PHP Environment
    ##PHP

    ```shell
    sudo apt-get install php5-cli php5-common php-apc php-pear php5-xdebug php5-curl php5
    sudo apt-get install php5-xsl
    sudo apt-get install php5-intl
    ```

    ##PEAR

    ```shell
    sudo pear channel-update PEAR
    sudo pear upgrade PEAR
    @@ -111,7 +102,6 @@ sudo pear install phing/phing

    #Installation of QA Environment
    ##CodeSiffer

    ```shell
    sudo pear install PHP_CodeSniffer
    ```
    @@ -121,7 +111,6 @@ sudo pear install PHP_CodeSniffer
    * [private](https://github.com/nzzdev/Symfony2-coding-standard/blob/master/README.md)

    ##PHPUnit

    ```shell
    #necessary if you already have installed phpunit via apt-get
    sudo apt-get remove phpunit
    @@ -140,7 +129,6 @@ sudo pear install --force --alldeps phpunit/PHPUnit
    ##Apache2

    Assume you want to have your projects in /home/your_username/eos

    ```shell
    # Change user/group of Apache2
    # edit /etc/apache2/apache2.conf
    @@ -152,6 +140,7 @@ Group <your_usergroup>
    * Add this settings in /etc/php5/cli/php.ini for for *all webservers*
    * Add this settings in /etc/php5/apache2/php.ini if you have installed *apache2*
    * Add this settings in /etc/php5/fpm/php.ini if you have installed *nginx and fpm*

    ```shell
    memory_limit = 512m
    display_errors = On
    @@ -166,7 +155,6 @@ xdebug.max_nesting_level = 1000

    #Debugging with XDebug on Browser and Command line
    ##Configuration

    ```shell
    #Edit /etc/php5/cli/conf.d/xdebug.ini
    xdebug.remote_enable=On
    @@ -202,7 +190,6 @@ source ~/.bashrc
    * Usually it’s stored in `/usr/share/php/PHPUnit`

    #Apache2 config example

    ```shell
    #Assume you want to have your project in
    /home/username/my_webside
  19. @DaRaFF DaRaFF revised this gist Nov 2, 2012. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,6 @@ I hope it's a help also for you!
    #Installation General Environment
    <a name="phpstorm"></a>
    ##PHP Storm

    ```shell
    #Download and install PHP Storm - http://www.jetbrains.com/phpstorm/
    #Install Sun JDK - http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
  20. @DaRaFF DaRaFF revised this gist Nov 2, 2012. 1 changed file with 6 additions and 7 deletions.
    13 changes: 6 additions & 7 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -150,17 +150,16 @@ Group <your_usergroup>
    ```

    ##PHP
    * Add this settings in /etc/php5/cli/php.ini for for *all webservers*
    * Add this settings in /etc/php5/apache2/php.ini if you have installed *apache2*
    * Add this settings in /etc/php5/fpm/php.ini if you have installed *nginx and fpm*
    ```shell
    #Edit /etc/php5/cli/php.ini for for all webservers
    #Edit /etc/php5/apache2/php.ini if you have installed apache2
    #Edit /etc/php5/fpm/php.ini if you have installed nginx and fpm
    memory_limit = 512m
    display_errors = On
    html_errors = On
    post_max_size = 32m
    upload_max_filesize = 32m
    default_charset = utf8
    allow_url_fopen = On

    #Edit /etc/php5/cli/conf.d/xdebug.ini
    xdebug.max_nesting_level = 1000
    @@ -170,15 +169,15 @@ xdebug.max_nesting_level = 1000
    ##Configuration

    ```shell
    #Edit `/etc/php5/cli/conf.d/xdebug.ini`
    #Edit /etc/php5/cli/conf.d/xdebug.ini
    xdebug.remote_enable=On
    xdebug.remote_host=localhost
    xdebug.remote_port=9002
    xdebug.remote_handler=dbgp

    sudo service apache2 restart

    #Add to `/home/<your_username>/.bashrc`
    #Add to /home/<your_username>/.bashrc
    export XDEBUG_CONFIG="PHPSTORM";

    #reload bash settings
    @@ -209,7 +208,7 @@ source ~/.bashrc
    #Assume you want to have your project in
    /home/username/my_webside

    #Add entry to `/etc/hosts`
    #Add entry to /etc/hosts
    127.0.0.1 www.my_webside.lo

    #Create file
  21. @DaRaFF DaRaFF revised this gist Nov 2, 2012. 1 changed file with 107 additions and 55 deletions.
    162 changes: 107 additions & 55 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -11,106 +11,158 @@ I hope it's a help also for you!
    #Installation General Environment
    <a name="phpstorm"></a>
    ##PHP Storm
    * Download and install PHP Storm - http://www.jetbrains.com/phpstorm/
    * Install Sun JDK - http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
    * increase file watching limit (http://confluence.jetbrains.net/display/IDEADEV/Inotify+Watches+Limit)
    * add `fs.inotify.max_user_watches = 524288` to `/etc/sysctl.conf`
    * apply change `sudo sysctl -p`

    ```shell
    #Download and install PHP Storm - http://www.jetbrains.com/phpstorm/
    #Install Sun JDK - http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
    #increase file watching limit (http://confluence.jetbrains.net/display/IDEADEV/Inotify+Watches+Limit)
    #add line to /etc/sysctl.conf
    fs.inotify.max_user_watches = 524288

    #apply changes
    sudo sysctl -p
    ```

    <a name="git"></a>
    ##git
    * `sudo apt-get install git`
    * `git config --global color.branch auto`
    * `git config --global color.diff auto`
    * `git config --global color.status auto`
    * Manual on how to install ssh keys on github http://help.github.com/linux-set-up-git/

    ```shell
    sudo apt-get install git
    git config --global color.branch auto
    git config --global color.diff auto
    git config --global color.status auto

    #Manual on how to install ssh keys on github http://help.github.com/linux-set-up-git/
    ```

    ##memcache
    * `sudo apt-get install memcached`
    * `sudo apt-get install php5-memcache`

    ```shell
    sudo apt-get install memcached
    sudo apt-get install php5-memcache
    ```

    ##apache2
    * `sudo apt-get install apache2`
    * `sudo a2enmod rewrite`
    * `sudo apt-get install libapache2-mod-php5`

    ```shell
    sudo apt-get install apache2
    sudo a2enmod rewrite
    sudo apt-get install libapache2-mod-php5
    ```

    ##nginx
    * `sudo apt-get install nginx php5-fpm`
    * edit listen port in /etc/php5/fpm/pool.d/www.conf
    * `listen = 127.0.0.1:9009`
    * `sudo /etc/init.d/php5-fpm restart`
    * `sudo service nginx restart`

    ```shell
    sudo apt-get install nginx php5-fpm

    #edit listen port in /etc/php5/fpm/pool.d/www.conf
    listen = 127.0.0.1:9009

    sudo /etc/init.d/php5-fpm restart
    sudo service nginx restart
    ```

    ##mysql
    * `sudo apt-get install mysql-server`
    * `sudo apt-get install php5-mysql`

    ```shell
    sudo apt-get install mysql-server
    sudo apt-get install php5-mysql
    ```

    ##PHP SQLite
    * `sudo apt-get install php5-sqlite`
    * comment `extension=sqlite.so` in `/etc/php5/conf.d/sqlite.ini`

    ```shell
    sudo apt-get install php5-sqlite

    #comment in /etc/php5/conf.d/sqlite.ini
    extension=sqlite.so
    ```

    ##gmagick
    * `sudo apt-get install graphicsmagick libgraphicsmagick1-dev`
    * `sudo pecl install gmagick-beta`
    * Create file /etc/php5/conf.d/gmagick.ini and add a line `extension=gmagick.so`

    ```shell
    sudo apt-get install graphicsmagick libgraphicsmagick1-dev
    sudo pecl install gmagick-beta

    #Create file /etc/php5/conf.d/gmagick.ini and add a line
    extension=gmagick.so
    ```

    #Installation PHP Environment
    ##PHP
    * `sudo apt-get install php5-cli php5-common php-apc php-pear php5-xdebug php5-curl php5`
    * `sudo apt-get install php5-xsl`
    * `sudo apt-get install php5-intl`

    ```shell
    sudo apt-get install php5-cli php5-common php-apc php-pear php5-xdebug php5-curl php5
    sudo apt-get install php5-xsl
    sudo apt-get install php5-intl
    ```

    ##PEAR
    * `sudo pear channel-update PEAR`
    * `sudo pear upgrade PEAR`

    ```shell
    sudo pear channel-update PEAR
    sudo pear upgrade PEAR
    ```

    ##PHING
    * `sudo pear channel-discover pear.phing.info`
    * `sudo pear install phing/phing`
    ```shell
    sudo pear channel-discover pear.phing.info
    sudo pear install phing/phing
    ```

    #Installation of QA Environment
    ##CodeSiffer
    * `sudo pear install PHP_CodeSniffer`
    * README Symfony2 Coding Standard

    ```shell
    sudo pear install PHP_CodeSniffer
    ```

    * README Symfony2 Coding Standard
    * [public](https://github.com/opensky/Symfony2-coding-standard)
    * [private](https://github.com/nzzdev/Symfony2-coding-standard/blob/master/README.md)

    ##PHPUnit
    * `sudo apt-get remove phpunit` (necessary if you already have installed phpunit via apt-get)
    * `sudo pear channel-discover pear.phpunit.de`
    * `sudo pear channel-discover pear.symfony-project.com`
    * `sudo pear channel-discover components.ez.no`
    * `sudo pear update-channels`
    * `sudo pear upgrade-all`
    * `sudo pear install --alldeps phpunit/PHPUnit`
    * `sudo pear install --force --alldeps phpunit/PHPUnit`


    ```shell
    #necessary if you already have installed phpunit via apt-get
    sudo apt-get remove phpunit

    sudo pear channel-discover pear.phpunit.de
    sudo pear channel-discover pear.symfony-project.com
    sudo pear channel-discover components.ez.no
    sudo pear update-channels
    sudo pear upgrade-all
    sudo pear install --alldeps phpunit/PHPUnit
    sudo pear install --force --alldeps phpunit/PHPUnit
    ```

    #Configuration

    ##Apache2

    Assume you want to have your projects in /home/your_username/eos

    * Change user/group of Apache2
    * edit `/etc/apache2/apache2.conf`
    * set `User your_username`
    * set `Group your_usergroup`
    ```shell
    # Change user/group of Apache2
    # edit /etc/apache2/apache2.conf
    User >your_username>
    Group <your_usergroup>
    ```

    ##PHP
    * Edit /etc/php5/cli/php.ini for for all webservers
    * Edit /etc/php5/apache2/php.ini if you have installed apache2
    * Edit /etc/php5/fpm/php.ini if you have installed nginx and fpm
    ```shell
    #Edit /etc/php5/cli/php.ini for for all webservers
    #Edit /etc/php5/apache2/php.ini if you have installed apache2
    #Edit /etc/php5/fpm/php.ini if you have installed nginx and fpm
    memory_limit = 512m
    display_errors = On
    html_errors = On
    post_max_size = 32m
    upload_max_filesize = 32m
    default_charset = utf8
    allow_url_fopen = On
    ```
    * Edit /etc/php5/cli/conf.d/xdebug.ini
    ```shell

    #Edit /etc/php5/cli/conf.d/xdebug.ini
    xdebug.max_nesting_level = 1000
    ```

  22. @DaRaFF DaRaFF revised this gist Nov 2, 2012. 1 changed file with 38 additions and 25 deletions.
    63 changes: 38 additions & 25 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -100,28 +100,38 @@ Assume you want to have your projects in /home/your_username/eos
    * Edit /etc/php5/cli/php.ini for for all webservers
    * Edit /etc/php5/apache2/php.ini if you have installed apache2
    * Edit /etc/php5/fpm/php.ini if you have installed nginx and fpm
    * memory_limit = 512m
    * display_errors = On
    * html_errors = On
    * post_max_size = 32m
    * upload_max_filesize = 32m
    * default_charset = utf8
    * allow_url_fopen = On
    ```shell
    memory_limit = 512m
    display_errors = On
    html_errors = On
    post_max_size = 32m
    upload_max_filesize = 32m
    default_charset = utf8
    allow_url_fopen = On
    ```
    * Edit /etc/php5/cli/conf.d/xdebug.ini
    * xdebug.max_nesting_level = 1000
    ```shell
    xdebug.max_nesting_level = 1000
    ```

    #Debugging with XDebug on Browser and Command line
    ##Configuration
    * Edit /etc/php5/cli/conf.d/xdebug.ini
    * xdebug.remote_enable=On
    * xdebug.remote_host=localhost
    * xdebug.remote_port=9002
    * xdebug.remote_handler=dbgp
    * `sudo service apache2 restart`
    * Add to /home/<your_username>/.bashrc
    * export XDEBUG_CONFIG="PHPSTORM";
    * reload bash settings
    * `source ~/.bashrc`

    ```shell
    #Edit `/etc/php5/cli/conf.d/xdebug.ini`
    xdebug.remote_enable=On
    xdebug.remote_host=localhost
    xdebug.remote_port=9002
    xdebug.remote_handler=dbgp

    sudo service apache2 restart

    #Add to `/home/<your_username>/.bashrc`
    export XDEBUG_CONFIG="PHPSTORM";

    #reload bash settings
    source ~/.bashrc
    ```
    * Edit Settings in PHPStorm
    * Go to File->Settings->PHP->Debug
    * Change XDebug Debug Port to 9002
    @@ -144,12 +154,14 @@ Assume you want to have your projects in /home/your_username/eos
    #Apache2 config example

    ```shell
    #Assume you want to have your project in `/home/username/my_webside`
    #Edit `/etc/hosts`
    #Add
    `127.0.0.1 www.my_webside.lo`
    #Assume you want to have your project in
    /home/username/my_webside

    #Add entry to `/etc/hosts`
    127.0.0.1 www.my_webside.lo

    #Create file
    `/etc/apache2/sites-available/www.my_webside.lo`
    /etc/apache2/sites-available/www.my_webside.lo

    #edit file (with example config)
    <VirtualHost *:80>
    @@ -160,7 +172,8 @@ Assume you want to have your projects in /home/your_username/eos
    </VirtualHost>

    #create symbolic link to enable a site
    `sudo ln -s /etc/apache2/sites-available/www.my_webside.lo /etc/apache2/sites-enabled/www.my_webside.lo`
    sudo ln -s /etc/apache2/sites-available/www.my_webside.lo /etc/apache2/sites-enabled/www.my_webside.lo

    #restart apache
    `sudo /etc/init.d/apache2 restart`
    sudo /etc/init.d/apache2 restart
    ```
  23. @DaRaFF DaRaFF revised this gist Nov 2, 2012. 1 changed file with 13 additions and 10 deletions.
    23 changes: 13 additions & 10 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -143,21 +143,24 @@ Assume you want to have your projects in /home/your_username/eos

    #Apache2 config example

    * Assume you want to have your project in `/home/username/my_webside`
    * Edit `/etc/hosts`
    * Add `127.0.0.1 www.my_webside.lo`
    * Create file `/etc/apache2/sites-available/www.my_webside.lo`
    * edit file (with example config)

    ```shell
    #Assume you want to have your project in `/home/username/my_webside`
    #Edit `/etc/hosts`
    #Add
    `127.0.0.1 www.my_webside.lo`
    #Create file
    `/etc/apache2/sites-available/www.my_webside.lo`

    #edit file (with example config)
    <VirtualHost *:80>
    ServerName www.my_webside.lo
    DocumentRoot /home/username/my_webside/web
    ErrorLog ${APACHE_LOG_DIR}/www.my_webside.lo.error.log
    CustomLog ${APACHE_LOG_DIR}/www.my_webside.lo.access.log common
    </VirtualHost>
    ```

    * create symbolic link to enable a site:
    * `sudo ln -s /etc/apache2/sites-available/www.my_webside.lo /etc/apache2/sites-enabled/www.my_webside.lo`
    * `sudo /etc/init.d/apache2 restart`
    #create symbolic link to enable a site
    `sudo ln -s /etc/apache2/sites-available/www.my_webside.lo /etc/apache2/sites-enabled/www.my_webside.lo`
    #restart apache
    `sudo /etc/init.d/apache2 restart`
    ```
  24. @DaRaFF DaRaFF revised this gist Nov 2, 2012. 1 changed file with 8 additions and 4 deletions.
    12 changes: 8 additions & 4 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -144,16 +144,20 @@ Assume you want to have your projects in /home/your_username/eos
    #Apache2 config example

    * Assume you want to have your project in `/home/username/my_webside`
    * Edit /etc/hosts
    * Add 127.0.0.1 www.my_webside.lo
    * Create file /etc/apache2/sites-available/www.my_webside.lo
    * Edit `/etc/hosts`
    * Add `127.0.0.1 www.my_webside.lo`
    * Create file `/etc/apache2/sites-available/www.my_webside.lo`
    * edit file (with example config)

    ```shell
    <VirtualHost *:80>
    ServerName www.my_webside.lo
    DocumentRoot /home/username/my_webside/web
    ErrorLog ${APACHE_LOG_DIR}/www.my_webside.lo.error.log
    CustomLog ${APACHE_LOG_DIR}/www.my_webside.lo.access.log common
    </VirtualHost>
    ```

    * create symbolic link to enable a site:
    * `sudo ln -s /etc/apache2/sites-available/www.my_webside.lo /etc/apache2/sites-enabled/www.my_webside.lo`
    * sudo /etc/init.d/apache2 restart
    * `sudo /etc/init.d/apache2 restart`
  25. @DaRaFF DaRaFF revised this gist Nov 2, 2012. 1 changed file with 5 additions and 4 deletions.
    9 changes: 5 additions & 4 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -65,15 +65,16 @@ I hope it's a help also for you!
    * `sudo pear upgrade PEAR`

    ##PHING
    sudo pear channel-discover pear.phing.info
    sudo pear install phing/phing
    * `sudo pear channel-discover pear.phing.info`
    * `sudo pear install phing/phing`

    #Installation of QA Environment
    ##CodeSiffer
    * `sudo pear install PHP_CodeSniffer`
    * README Symfony2 Coding Standard
    * (public)[https://github.com/opensky/Symfony2-coding-standard]
    * (private)[https://github.com/nzzdev/Symfony2-coding-standard/blob/master/README.md]

    * [public](https://github.com/opensky/Symfony2-coding-standard)
    * [private](https://github.com/nzzdev/Symfony2-coding-standard/blob/master/README.md)

    ##PHPUnit
    * `sudo apt-get remove phpunit` (necessary if you already have installed phpunit via apt-get)
  26. @DaRaFF DaRaFF revised this gist Nov 2, 2012. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -72,8 +72,9 @@ sudo pear install phing/phing
    ##CodeSiffer
    * `sudo pear install PHP_CodeSniffer`
    * README Symfony2 Coding Standard
    * [public](https://github.com/opensky/Symfony2-coding-standard)
    * [private](https://github.com/nzzdev/Symfony2-coding-standard/blob/master/README.md)
    * (public)[https://github.com/opensky/Symfony2-coding-standard]
    * (private)[https://github.com/nzzdev/Symfony2-coding-standard/blob/master/README.md]

    ##PHPUnit
    * `sudo apt-get remove phpunit` (necessary if you already have installed phpunit via apt-get)
    * `sudo pear channel-discover pear.phpunit.de`
  27. @DaRaFF DaRaFF revised this gist Nov 2, 2012. 1 changed file with 22 additions and 46 deletions.
    68 changes: 22 additions & 46 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -75,13 +75,15 @@ sudo pear install phing/phing
    * [public](https://github.com/opensky/Symfony2-coding-standard)
    * [private](https://github.com/nzzdev/Symfony2-coding-standard/blob/master/README.md)
    ##PHPUnit
    * `sudo apt-get remove phpunit` (necessary if you already have installed phpunit via apt-get)
    * `sudo pear channel-discover pear.phpunit.de`
    * `sudo pear channel-discover components.ez.no`
    * `sudo pear channel-discover pear.symfony-project.com`
    * `sudo apt-get install phpunit`
    * `sudo pear install phpunit/PHPUnit`
    * `sudo pear channel-discover components.ez.no`
    * `sudo pear update-channels`
    * `sudo pear upgrade-all`
    * `sudo pear install --alldeps phpunit/PHPUnit`
    * `sudo pear install --force --alldeps phpunit/PHPUnit`


    #Configuration

    ##Apache2
    @@ -93,7 +95,9 @@ Assume you want to have your projects in /home/your_username/eos
    * set `Group your_usergroup`

    ##PHP
    * Edit /etc/php5/cli/php.ini and /etc/php5/apache2/php.ini
    * Edit /etc/php5/cli/php.ini for for all webservers
    * Edit /etc/php5/apache2/php.ini if you have installed apache2
    * Edit /etc/php5/fpm/php.ini if you have installed nginx and fpm
    * memory_limit = 512m
    * display_errors = On
    * html_errors = On
    @@ -135,47 +139,19 @@ Assume you want to have your projects in /home/your_username/eos
    * for PHPUnit Code Completion add PHPUnit path under file->settings-directories
    * Usually it’s stored in `/usr/share/php/PHPUnit`

    #Apache2 config example







    #Install www project

    Assume you want to have your project in /home/username/eos/www

    cd /home/<username>/eos
    git clone git@github.com:nzzdev/www
    cd www
    bin/install.sh --env=dev from the project root directory
    #Config www project with Apache2

    Edit /etc/hosts
    Add 127.0.0.1 www.sql.nzz.lo

    Create file /etc/apache2/sites-available/nzz.lo
    and add config

    * Assume you want to have your project in `/home/username/my_webside`
    * Edit /etc/hosts
    * Add 127.0.0.1 www.my_webside.lo
    * Create file /etc/apache2/sites-available/www.my_webside.lo
    * edit file (with example config)
    <VirtualHost *:80>
    ServerName www.sql.nzz.lo
    DocumentRoot /home/username/eos/www-sql/web
    ErrorLog ${APACHE_LOG_DIR}/www.sql.error.log
    CustomLog ${APACHE_LOG_DIR}/www.sql.access.log common
    ServerName www.my_webside.lo
    DocumentRoot /home/username/my_webside/web
    ErrorLog ${APACHE_LOG_DIR}/www.my_webside.lo.error.log
    CustomLog ${APACHE_LOG_DIR}/www.my_webside.lo.access.log common
    </VirtualHost>

    create symbolic link to enable a site:
    sudo ln -s /etc/apache2/sites-available/nzz.lo /etc/apache2/sites-enabled/nzz.lo
    restart apache2:
    sudo /etc/init.d/apache2 restart






    Install Backend


    sudo apt-get install rabbitmq-server
    * create symbolic link to enable a site:
    * `sudo ln -s /etc/apache2/sites-available/www.my_webside.lo /etc/apache2/sites-enabled/www.my_webside.lo`
    * sudo /etc/init.d/apache2 restart
  28. @DaRaFF DaRaFF revised this gist Nov 2, 2012. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -34,6 +34,13 @@ I hope it's a help also for you!
    * `sudo a2enmod rewrite`
    * `sudo apt-get install libapache2-mod-php5`

    ##nginx
    * `sudo apt-get install nginx php5-fpm`
    * edit listen port in /etc/php5/fpm/pool.d/www.conf
    * `listen = 127.0.0.1:9009`
    * `sudo /etc/init.d/php5-fpm restart`
    * `sudo service nginx restart`

    ##mysql
    * `sudo apt-get install mysql-server`
    * `sudo apt-get install php5-mysql`
  29. @DaRaFF DaRaFF revised this gist Nov 2, 2012. 1 changed file with 74 additions and 89 deletions.
    163 changes: 74 additions & 89 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -29,119 +29,104 @@ I hope it's a help also for you!
    * `sudo apt-get install memcached`
    * `sudo apt-get install php5-memcache`

    ###apache2
    ##apache2
    * `sudo apt-get install apache2`
    * `sudo a2enmod rewrite`
    * `sudo apt-get install libapache2-mod-php5`

    ###mysql
    ##mysql
    * `sudo apt-get install mysql-server`
    * `sudo apt-get install php5-mysql`

    ##PHP SQLite
    * `sudo apt-get install php5-sqlite`
    * comment `extension=sqlite.so` in `/etc/php5/conf.d/sqlite.ini`

    ##Installation PHP Environment
    ###PHP
    sudo apt-get install php5-cli php5-common php-apc php-pear php5-xdebug php5-curl php5
    ##gmagick
    * `sudo apt-get install graphicsmagick libgraphicsmagick1-dev`
    * `sudo pecl install gmagick-beta`
    * Create file /etc/php5/conf.d/gmagick.ini and add a line `extension=gmagick.so`

    ###PHP XSL
    sudo apt-get install php5-xsl

    ###PHP SQLite (to profile backend app)
    sudo apt-get install php5-sqlite
    comment out extension=sqlite.so in /etc/php5/conf.d/sqlite.ini

    ###PHP Internationalisierung
    sudo apt-get install php5-intl

    ###Update PEAR
    sudo pear channel-update PEAR
    sudo pear upgrade PEAR

    ##Installation of QA Environment
    ###CodeSniffer
    sudo pear install PHP_CodeSniffer

    ###Coding Standards Symfony
    Follow this README - https://github.com/nzzdev/Symfony2-coding-standard/blob/master/README.md
    #Installation PHP Environment
    ##PHP
    * `sudo apt-get install php5-cli php5-common php-apc php-pear php5-xdebug php5-curl php5`
    * `sudo apt-get install php5-xsl`
    * `sudo apt-get install php5-intl`

    ###PHPUnit
    sudo pear channel-discover pear.phpunit.de
    sudo pear channel-discover components.ez.no
    sudo pear channel-discover pear.symfony-project.com
    sudo apt-get install phpunit
    sudo pear install phpunit/PHPUnit
    ##PEAR
    * `sudo pear channel-update PEAR`
    * `sudo pear upgrade PEAR`

    # PHING
    ##PHING
    sudo pear channel-discover pear.phing.info
    sudo pear install phing/phing

    # gmagick
    sudo apt-get install graphicsmagick libgraphicsmagick1-dev
    sudo pecl install gmagick-beta
    Create file /etc/php5/conf.d/gmagick.ini and add a line "extension=gmagick.so"
    #Installation of QA Environment
    ##CodeSiffer
    * `sudo pear install PHP_CodeSniffer`
    * README Symfony2 Coding Standard
    * [public](https://github.com/opensky/Symfony2-coding-standard)
    * [private](https://github.com/nzzdev/Symfony2-coding-standard/blob/master/README.md)
    ##PHPUnit
    * `sudo pear channel-discover pear.phpunit.de`
    * `sudo pear channel-discover components.ez.no`
    * `sudo pear channel-discover pear.symfony-project.com`
    * `sudo apt-get install phpunit`
    * `sudo pear install phpunit/PHPUnit`


    #Configuration

    ##Apache2
    Assume you want to have your projects in /home/username/eos
    Assume you want to have your projects in /home/your_username/eos

    ###Change user/group of Apache2
    edit /etc/apache2/apache2.conf
    User username
    Group usergroup
    * Change user/group of Apache2
    * edit `/etc/apache2/apache2.conf`
    * set `User your_username`
    * set `Group your_usergroup`

    ##PHP
    Edit /etc/php5/cli/php.ini and /etc/php5/apache2/php.ini
    memory_limit = 512m
    display_errors = On
    html_errors = On
    post_max_size = 32m
    upload_max_filesize = 32m
    default_charset = utf8
    allow_url_fopen = On
    date.timezone = “Europe/Zurich”
    intl.default_locale = de_CH

    Edit /etc/php5/cli/conf.d/xdebug.ini
    xdebug.max_nesting_level = 1000

    ##Debugging with Browser and Command line
    Edit /etc/php5/cli/conf.d/xdebug.ini
    xdebug.remote_enable=On
    xdebug.remote_host=localhost
    xdebug.remote_port=9002
    xdebug.remote_handler=dbgp

    Restart Apache2
    sudo service apache2 restart

    Add to /home/<usernmae>/.bashrc
    export XDEBUG_CONFIG="PHPSTORM";

    execute on console (to reload bash settings)
    source ~/.bashrc


    Edit Settings in PHPStorm
    Go to File->Settings->PHP->Debug
    Change XDebug Debug Port to 9002

    Install Easy XDebug Plugin for Firefox
    https://addons.mozilla.org/de/firefox/addon/easy-xdebug/

    ###Debugging via Firefox
    Firefox: Click on ‘StartXDebug Session’ Symbol on bottom right
    PHPStorm: Click on Run->Start Listen PHP Debug Connections
    Set a breakpoint and do call via firefox browser

    ###Debugging via Console
    PHPStorm: Click on Run->Start Listen PHP Debug Connections
    Set a breakpoint and run a console command
    * Edit /etc/php5/cli/php.ini and /etc/php5/apache2/php.ini
    * memory_limit = 512m
    * display_errors = On
    * html_errors = On
    * post_max_size = 32m
    * upload_max_filesize = 32m
    * default_charset = utf8
    * allow_url_fopen = On
    * Edit /etc/php5/cli/conf.d/xdebug.ini
    * xdebug.max_nesting_level = 1000

    #Debugging with XDebug on Browser and Command line
    ##Configuration
    * Edit /etc/php5/cli/conf.d/xdebug.ini
    * xdebug.remote_enable=On
    * xdebug.remote_host=localhost
    * xdebug.remote_port=9002
    * xdebug.remote_handler=dbgp
    * `sudo service apache2 restart`
    * Add to /home/<your_username>/.bashrc
    * export XDEBUG_CONFIG="PHPSTORM";
    * reload bash settings
    * `source ~/.bashrc`
    * Edit Settings in PHPStorm
    * Go to File->Settings->PHP->Debug
    * Change XDebug Debug Port to 9002
    * Install Easy XDebug Plugin for Firefox
    * https://addons.mozilla.org/de/firefox/addon/easy-xdebug/

    ##Debugging via Firefox
    * Firefox: Click on ‘StartXDebug Session’ Symbol on bottom right
    * PHPStorm: Click on Run->Start Listen PHP Debug Connections
    * Set a breakpoint and do call via firefox browser

    ##Debugging via Console
    * PHPStorm: Click on Run->Start Listen PHP Debug Connections
    * Set a breakpoint and run a console command

    ##PHPStorm Config
    for PHPUnit Code Completion add PHPUnit path under file->settings-directories
    Usually it’s stored in /usr/share/php/PHPUnit
    * for PHPUnit Code Completion add PHPUnit path under file->settings-directories
    * Usually it’s stored in `/usr/share/php/PHPUnit`



  30. @DaRaFF DaRaFF revised this gist Nov 2, 2012. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -11,10 +11,11 @@ I hope it's a help also for you!
    #Installation General Environment
    <a name="phpstorm"></a>
    ##PHP Storm
    * Download PHP Storm - http://www.jetbrains.com/phpstorm/
    * Download and install PHP Storm - http://www.jetbrains.com/phpstorm/
    * Install Sun JDK - http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
    * set value
    * dd
    * increase file watching limit (http://confluence.jetbrains.net/display/IDEADEV/Inotify+Watches+Limit)
    * add `fs.inotify.max_user_watches = 524288` to `/etc/sysctl.conf`
    * apply change `sudo sysctl -p`

    <a name="git"></a>
    ##git