Fix can not mount /dev/loop0

When you create ubuntu usb installation disk from windows, you will see that error. Simply just use unetbootin insteads of Usb Installer.


phpenv, drupalcs in fish shell

To add phpenv and other command to fish shell, run this command:
vim ~/.config/fish/

set PATH $HOME/.phpenv/bin $PATH
set cmd phpenv init -
eval $cmd

alias drupal8cs "$HOME/.composer/vendor/bin/phpcs --standard=$HOME/.composer/vendor/drupal/coder/coder_sniffer/Drupal --extensions='php,module,inc,install,test,profile,theme,js,css,info,txt'"

alias drupal8pr "$HOME/.composer/vendor/bin/phpcs --standard=$HOME/.composer/vendor/drupal/coder/coder_sniffer/DrupalPractice --extensions='php,module,inc,install,test,profile,theme,js,css,info,txt'"

To reload the configuration, run this command:
exec fish

Install phpdbg on ubuntu 14.04

  1. Install phpenv
  2. Download bison 2.7 and install it
  3. cd ~/.phpenv
    cd libexec
    vim phpenv-install
  4. Here is the most important part, we need to add more options to CONFIGURE_OPTIONS
    CONFIGURE_OPTIONS=”…….. –with-readline \ –enable-phpdbg\ ……………………..”
  5. phpenv install php-5.6.2
    At the time this post is published, the latest version of PHP is 5.6.2, you can change that.
  6. cd /path/to/your/index.php
    phpenv local 5.6.2
  7. Remember to restore configure options if you want to install other version of php via phpenv

How to install phing/phing in ubuntu 14.04

  1. Upgrade php5.5
  2. sudo pear install channel://
  3. sudo pear install channel://
  4. sudo pear install channel://
  5. sudo pear install channel://
  6. sudo pear install pear/PHP_CodeSniffer
  7. sudo pear install --alldeps phing/phing

Test installing drupal on multiple version of php

  1. vim ~/.phpenv/versions/5.3.28/etc/php.ini
  2. mv ~/.drush/php.ini ~/.drush/php.ini_bak
  3. cp ~/.phpenv/versions/5.3.28/etc/php.ini ~/.drush/
  4. php -m | grep intl
    Download php5-intl_5.3.10-1ubuntu3_i386.deb
    Copy to ~/.phpenv/versions/5.3.28/lib/php/extensions/no-debug-non-zts-20090626/
    Add this line to the end of ~/.phpenv/versions/5.3.28/etc/php.ini
  5. php -m | grep mcrypt
    Download php5-mcrypt_5.3.2-0ubuntu1_i386.deb
    Copy to ~/.phpenv/versions/5.3.28/lib/php/extensions/no-debug-non-zts-20090626/
    Add these lines to the end of ~/.phpenv/versions/5.3.28/etc/php.ini
  6. Download libicu48_4.8.1.1-3ubuntu0.1_i386.deb and install it