Last active
          October 13, 2023 00:16 
        
      - 
            
      
        
      
    Star
      
          
          (159)
      
  
You must be signed in to star a gist 
- 
              
      
        
      
    Fork
      
          
          (77)
      
  
You must be signed in to fork a gist 
- 
      
- 
        Save DaRaFF/3995789 to your computer and use it in GitHub Desktop. 
Revisions
- 
        DaRaFF revised this gist Sep 2, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -160,6 +160,8 @@ sudo pear config-set auto_discover 1 sudo pear install pear.phpunit.de/PHPUnit_SkeletonGenerator ``` It's getting easier now to install phpunit -> https://phpunit.de/getting-started.html (have to check that and put it into the documentation <a name="php-cs-fixer"></a> ##php-cs-fixer ```shell 
- 
        DaRaFF revised this gist Jul 10, 2014 . 1 changed file with 43 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,6 +27,9 @@ https://github.com/mheiniger/webdev-setup * [PHPUnit](#phpunit) * [PHP CS Fixer](#php-cs-fixer) * [PHPStorm IDE](#phpstorm) * Frontend Tools * [NodeJs + Grunt + Bower](#nodejs) * [PNG Tools for Iconizr](#iconizr) * Other * [php.ini settings](#php-ini) * [How to debug with XDebug and PHPStorm on Firefox and command line](#debugging-with-phpstorm) @@ -178,6 +181,46 @@ fs.inotify.max_user_watches = 524288 sudo sysctl -p ``` #Frontend Tools <a name="nodejs"></a> ##NodeJs + Grunt + Bower ```shell # nodejs sudo apt-get install python-software-properties sudo apt-add-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs #grunt sudo npm install -g grunt-cli #bower sudo npm install -g bower ``` <a name="iconizr"></a> ##PNG Tools for Iconizr ```shell # PNG Tools for Iconizr sudo apt-get install pngcrush pngquant optipng sudo apt-get install checkinstall cd /tmp wget http://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-0.7.4/optipng-0.7.4.tar.gz tar xvf optipng-0.7.4.tar.gz cd optipng-0.7.4 ./configure make sudo checkinstall ``` #Configuration <a name="php-ini"></a> 
- 
        DaRaFF revised this gist Jul 8, 2014 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -201,12 +201,12 @@ default_charset = utf8 The example is made for PHPStorm IDE with Apache2 webserver. But other IDE's or webservers should work in a similar way. * Ubuntu 12.04 * Edit /etc/php5/cli/conf.d/xdebug.ini * Ubuntu 14.04 * with php-fpm -> `sudo ln -s /etc/php5/mods-available/xdebug.ini /etc/php5/fpm/conf.d/20-xdebug.ini` * with apache2 -> `sudo ln -s /etc/php5/mods-available/xdebug.ini /etc/php5/apache2/conf.d/20-xdebug.ini` * with cli -> `sudo ln -s /etc/php5/mods-available/xdebug.ini /etc/php5/cli/conf.d/20-xdebug.ini` * Edit /etc/php5/mods-available/xdebug.ini ##Configuration ```shell 
- 
        DaRaFF revised this gist Jul 8, 2014 . 1 changed file with 11 additions and 7 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -195,19 +195,22 @@ upload_max_filesize = 32m default_charset = utf8 ``` <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. * Ubuntu 12.04 ** Edit /etc/php5/cli/conf.d/xdebug.ini * Ubuntu 14.04 ** with php-fpm -> `sudo ln -s /etc/php5/mods-available/xdebug.ini /etc/php5/fpm/conf.d/20-xdebug.ini` ** with apache2 -> `sudo ln -s /etc/php5/mods-available/xdebug.ini /etc/php5/apache2/conf.d/20-xdebug.ini` ** with cli -> `sudo ln -s /etc/php5/mods-available/xdebug.ini /etc/php5/cli/conf.d/20-xdebug.ini` ** Edit /etc/php5/mods-available/xdebug.ini ##Configuration ```shell #Edit xdebug.ini xdebug.remote_enable=On xdebug.remote_host=localhost xdebug.remote_port=9002 @@ -216,6 +219,7 @@ xdebug.profiler_append=Off xdebug.profiler_enable=Off xdebug.profiler_enable_trigger=Off xdebug.profiler_output_dir="/tmp/kcachegrind" xdebug.max_nesting_level = 1000 sudo service apache2 restart 
- 
        DaRaFF revised this gist Oct 13, 2013 . No changes.There are no files selected for viewing
- 
        DaRaFF revised this gist Oct 13, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ This is for a developer machine and not for a live environment! I hope it helps you too! fyi [@mheiniger](https://github.com/mheiniger) and [me](https://github.com/DaRaFF) started with an installer here: https://github.com/mheiniger/webdev-setup #Installation stack 
- 
        DaRaFF revised this gist Oct 13, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ This is for a developer machine and not for a live environment! I hope it helps you too! fyi [@mheiniger](https://github.com/mheiniger) and me started with an installer here: https://github.com/mheiniger/webdev-setup #Installation stack 
- 
        DaRaFF revised this gist Oct 13, 2013 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,12 @@ #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 a live environment! I hope it helps you too! fyi @mheiniger and me started with an installer here: https://github.com/mheiniger/webdev-setup #Installation stack * PHP Environment 
- 
        DaRaFF revised this gist Oct 13, 2013 . 1 changed file with 27 additions and 27 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,10 @@ This is for a developer machine and not for live environment! I hope it's a help also for you! #Installation stack * PHP Environment * [PHP5](#php) * [PEAR](#pear) * [Phing](#phing) * General Environment * [git / github](#git) * [memcache](#memcache) @@ -15,10 +19,6 @@ I hope it's a help also for you! * [sqlite](#sqlite) * [gmagick](#gmagick) * [curl](#curl) * PHP QA Environment * [PHP Codesniffer](#php-codesniffer) * [PHPUnit](#phpunit) @@ -30,6 +30,29 @@ I hope it's a help also for you! * [Apache2 config example](#apache2-config-example) * [Nginx config example](#nginx-config-example) #Installation PHP Environment <a name="php"></a> ##PHP5 ```shell sudo apt-get install php5-cli php5-common php-apc php-pear php5-xdebug php5-curl php5 php5-dev 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 ``` #Install General Environment <a name="git"></a> ##git @@ -100,29 +123,6 @@ extension=gmagick.so sudo apt-get install curl ``` #Installation PHP QA Environment <a name="php-codesniffer"></a> ##CodeSniffer 
- 
        DaRaFF revised this gist Feb 20, 2013 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -209,6 +209,10 @@ xdebug.remote_enable=On xdebug.remote_host=localhost xdebug.remote_port=9002 xdebug.remote_handler=dbgp xdebug.profiler_append=Off xdebug.profiler_enable=Off xdebug.profiler_enable_trigger=Off xdebug.profiler_output_dir="/tmp/kcachegrind" sudo service apache2 restart 
- 
        DaRaFF revised this gist Dec 3, 2012 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -158,6 +158,7 @@ sudo pear install pear.phpunit.de/PHPUnit_SkeletonGenerator ##php-cs-fixer ```shell sudo wget http://cs.sensiolabs.org/get/php-cs-fixer.phar -O /usr/local/bin/php-cs-fixer sudo chmod a+x /usr/local/bin/php-cs-fixer ``` <a name="phpstorm"></a> 
- 
        DaRaFF revised this gist Dec 3, 2012 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,6 +22,7 @@ I hope it's a help also for you! * PHP QA Environment * [PHP Codesniffer](#php-codesniffer) * [PHPUnit](#phpunit) * [PHP CS Fixer](#php-cs-fixer) * [PHPStorm IDE](#phpstorm) * Other * [php.ini settings](#php-ini) @@ -153,6 +154,12 @@ sudo pear config-set auto_discover 1 sudo pear install pear.phpunit.de/PHPUnit_SkeletonGenerator ``` <a name="php-cs-fixer"></a> ##php-cs-fixer ```shell sudo wget http://cs.sensiolabs.org/get/php-cs-fixer.phar -O /usr/local/bin/php-cs-fixer ``` <a name="phpstorm"></a> ##PHP Storm IDE * Download and install PHP Storm - http://www.jetbrains.com/phpstorm/ 
- 
        DaRaFF revised this gist Nov 29, 2012 . 1 changed file with 72 additions and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,6 +27,7 @@ I hope it's a help also for you! * [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) * [Nginx config example](#nginx-config-example) #Install General Environment <a name="git"></a> @@ -245,7 +246,7 @@ source ~/.bashrc <a name="apache2-config-example"></a> #Apache2 config example (with Symfony2 framework) Assume you want to have your project in `/home/username/my_webside` ```shell @@ -273,4 +274,74 @@ sudo ln -s /etc/apache2/sites-available/www.my_webside.lo /etc/apache2/sites-ena #restart apache sudo /etc/init.d/apache2 restart ``` <a name="nginx-config-example"></a> #Nginx config example (with Symfony2 framework) Assume you want to have your project in `/home/username/my_webside` ```shell # Change user of Nginx # edit /etc/nginx/nginx.conf User <username> # Change user of php5-fpm # edit /etc/php5/fpm/pool.d/www.conf user = <username> group = <group of user> #Add entry to /etc/hosts 127.0.0.1 www.my_webside.lo #Create file /etc/nginx/sites-available/www.my_webside.lo #edit file (with example config) #www.my_webside.lo server { listen 80; server_name www.my_webside.lo; access_log /var/log/nginx/www.my_webside.lo.log; location / { root /home/username/my_webside/web; index index.html index.htm index.php app_dev.php; if ($request_filename !~ "\.(js|htc|ico|gif|jpg|png|css)$") { rewrite ^(.*) /app.php$1 last; } } location ~ \.php($|/) { set $script $uri; set $path_info ""; if ($uri ~ "^(.+\.php)(/.+)") { set $script $1; set $path_info $2; } fastcgi_pass 127.0.0.1:9009; include fastcgi_params; fastcgi_buffers 8 16k; fastcgi_buffer_size 32k; fastcgi_param SCRIPT_FILENAME /home/username/my_webside/web$script; fastcgi_param PATH_INFO $path_info; } } #create symbolic link to enable a site sudo ln -s /etc/nginx/sites-available/www.my_webside.lo /etc/nginx/sites-enabled/www.my_webside.lo #restart nginx sudo /etc/init.d/nginx restart sudo /etc/init.d/php5-fpm restart ``` 
- 
        DaRaFF revised this gist Nov 6, 2012 . 1 changed file with 13 additions and 2 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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 ```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 
- 
        DaRaFF revised this gist Nov 6, 2012 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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> 
- 
        DaRaFF revised this gist Nov 5, 2012 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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 
- 
        DaRaFF renamed this gist Nov 3, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewingFile renamed without changes.
- 
        DaRaFF renamed this gist Nov 3, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewingFile renamed without changes.
- 
        DaRaFF revised this gist Nov 3, 2012 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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` 
- 
        DaRaFF revised this gist Nov 3, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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) ```shell #add line to /etc/sysctl.conf fs.inotify.max_user_watches = 524288 
- 
        DaRaFF revised this gist Nov 3, 2012 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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 #add line to /etc/sysctl.conf fs.inotify.max_user_watches = 524288 
- 
        DaRaFF revised this gist Nov 3, 2012 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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> 
- 
        DaRaFF revised this gist Nov 3, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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> ##CodeSniffer ```shell sudo pear install PHP_CodeSniffer ``` 
- 
        DaRaFF revised this gist Nov 3, 2012 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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 PHP QA Environment <a name="php-codesniffer"></a> ##CodeSiffer ```shell 
- 
        DaRaFF revised this gist Nov 3, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -71,7 +71,7 @@ sudo apt-get install php5-mysql ``` <a name="sqlite"></a> ##SQLite ```shell sudo apt-get install sqlite3 php5-sqlite @@ -91,7 +91,7 @@ extension=gmagick.so #Installation PHP Environment <a name="php"></a> ##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 
- 
        DaRaFF revised this gist Nov 3, 2012 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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) * 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> 
- 
        DaRaFF revised this gist Nov 3, 2012 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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 * General Environment * [git / github](#git) * [memcache](#memcache) 
- 
        DaRaFF revised this gist Nov 3, 2012 . 1 changed file with 19 additions and 2 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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) * 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> 
- 
        DaRaFF revised this gist Nov 3, 2012 . 1 changed file with 37 additions and 29 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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) #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 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 ``` <a name="phpstorm"></a> ##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 #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 * 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 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 
- 
        DaRaFF revised this gist Nov 2, 2012 . 1 changed file with 7 additions and 4 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -137,9 +137,9 @@ Group <your_usergroup> ``` ##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* * 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 ```shell xdebug.max_nesting_level = 1000 ``` 
NewerOlder