Forked from DaRaFF/ubuntu-php-development-environment.md
Created
November 18, 2012 13:49
Revisions
-
DaRaFF revised this gist
Nov 6, 2012 . 1 changed file with 13 additions and 2 deletions.There are no files selected for viewing
This 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 viewing
This 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 viewing
This 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 viewing
File 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 viewing
File 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 viewing
This 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 viewing
This 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 viewing
This 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 viewing
This 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 viewing
This 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 viewing
This 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 viewing
This 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 viewing
This 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 viewing
This 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 viewing
This 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 viewing
This 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 viewing
This 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 ``` -
DaRaFF revised this gist
Nov 2, 2012 . 1 changed file with 1 addition and 14 deletions.There are no files selected for viewing
This 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 @@ -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 -
DaRaFF revised this gist
Nov 2, 2012 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This 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 @@ -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 -
DaRaFF revised this gist
Nov 2, 2012 . 1 changed file with 6 additions and 7 deletions.There are no files selected for viewing
This 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 @@ -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 memory_limit = 512m display_errors = On html_errors = On post_max_size = 32m upload_max_filesize = 32m default_charset = utf8 #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 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 @@ -209,7 +208,7 @@ source ~/.bashrc #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 -
DaRaFF revised this gist
Nov 2, 2012 . 1 changed file with 107 additions and 55 deletions.There are no files selected for viewing
This 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 @@ -11,106 +11,158 @@ 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 #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 ```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 ```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 #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 ```shell sudo apt-get install mysql-server sudo apt-get install php5-mysql ``` ##PHP SQLite ```shell sudo apt-get install php5-sqlite #comment in /etc/php5/conf.d/sqlite.ini extension=sqlite.so ``` ##gmagick ```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 ```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 ``` ##PHING ```shell sudo pear channel-discover pear.phing.info sudo pear install phing/phing ``` #Installation of QA Environment ##CodeSiffer ```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 ```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 ```shell # Change user/group of Apache2 # edit /etc/apache2/apache2.conf User >your_username> Group <your_usergroup> ``` ##PHP ```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 ``` -
DaRaFF revised this gist
Nov 2, 2012 . 1 changed file with 38 additions and 25 deletions.There are no files selected for viewing
This 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 @@ -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 ```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 ```shell 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 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 #Add entry to `/etc/hosts` 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> @@ -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 #restart apache sudo /etc/init.d/apache2 restart ``` -
DaRaFF revised this gist
Nov 2, 2012 . 1 changed file with 13 additions and 10 deletions.There are no files selected for viewing
This 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 @@ -143,21 +143,24 @@ 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` #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` #restart apache `sudo /etc/init.d/apache2 restart` ``` -
DaRaFF revised this gist
Nov 2, 2012 . 1 changed file with 8 additions and 4 deletions.There are no files selected for viewing
This 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 @@ -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 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` -
DaRaFF revised this gist
Nov 2, 2012 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
This 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 @@ -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` #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 apt-get remove phpunit` (necessary if you already have installed phpunit via apt-get) -
DaRaFF revised this gist
Nov 2, 2012 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This 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 @@ -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] ##PHPUnit * `sudo apt-get remove phpunit` (necessary if you already have installed phpunit via apt-get) * `sudo pear channel-discover pear.phpunit.de` -
DaRaFF revised this gist
Nov 2, 2012 . 1 changed file with 22 additions and 46 deletions.There are no files selected for viewing
This 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 @@ -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 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 @@ -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 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 * 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 -
DaRaFF revised this gist
Nov 2, 2012 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This 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 @@ -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` -
DaRaFF revised this gist
Nov 2, 2012 . 1 changed file with 74 additions and 89 deletions.There are no files selected for viewing
This 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 @@ -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 * `sudo apt-get install apache2` * `sudo a2enmod rewrite` * `sudo apt-get install libapache2-mod-php5` ##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` ##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 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` ##PEAR * `sudo pear channel-update PEAR` * `sudo pear upgrade PEAR` ##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) ##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/your_username/eos * 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 * 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` -
DaRaFF revised this gist
Nov 2, 2012 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
This 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 @@ -11,10 +11,11 @@ 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` <a name="git"></a> ##git
NewerOlder