Install PHPunit on Ubuntu

Install the package

sudo apt-get install phpunit

Upgrade PEAR

sudo pear upgrade pear

Install all the dependencies

sudo pear channel-discover
sudo pear channel-discover
sudo pear channel-discover
sudo pear install --alldeps phpunit/PHPunit


phpunit --version

If you have any problem you can try this:

Install MySQL Workbench on Ubuntu 12.04

download MySQL Workbench on

sudo dpkg -i libzip1_0.9.3-1_i386.deb

64bits =>

This package (libmysqlclient16) was removed from 12.04 repos, so you need to grab the old one.

sudo dpkg -i libmysqlclient16_5.1.58-1ubuntu5_i386.deb

64bits =>

sudo apt-get install python-paramiko python-pysqlite2 mysql-client mysql-common libctemplate0 libgtkmm-2.4-1c2a

now install MySQL Workbench

sudo dpkg -i mysql-workbench-gpl-5.2.38-1ubu1104-i386.deb

Output while running (PHP)

for($i=0; $i<3; $i++)
   echo 'printing...';
   echo str_repeat(' ', 65536); // set a minimum output

Reverse Engineer (Workbench, Doctrine, Symfony2) with annotation

Hi guys!!

First of all you need to create a data model on workbench and update your database

After your database is populated, run this:

php app/console doctrine:mapping:convert xml ./src/[YOUR/BUNDLE]/Resources/config/doctrine/metadata/orm --from-database --force

so run this:

php app/console doctrine:mapping:import [YourBundle] annotation

and this:

php app/console doctrine:generate:entities [YourBundle]

Schema update (Symfony2 + Doctrine)

php app/console doctrine:schema:update --force [--env="[ENV]"]

Generate Entities (Symfony2 + Doctrine)

php app/console doctrine:generate:entities [BUNDLE]/Entity/[ENTITY]

list assume-changed files on git

git ls-files -v | grep "^[[:lower:]]"

routine to backup / restore mysql database

mysqldump -u root --password=[PASSWORD] [DATABASE] --compact -R --skip-lock-tables --default-character-set=utf8 | gzip -c > /path/to/your/$(date +%Y-%m-%d_%H-%M-%S)backup.gz
gunzip -c /path/to/your/backup.gz | mysql -u [USER] --password=[PASSWORD] [-h HOST] [DATABASE] --default-character-set=utf8

FIX Symfony2 vendor management GIT clone error

rror: RPC failed; result=18, HTTP code = 200MiB | 20 KiB/sfatal: The remote end hung up unexpectedlyfatal: early EOFfatal: index-pack failedwarning: http unexpectedly said: ’0000′

edit ‘deps’ file

change http to https


git=http: ….

git=https: ….

adduser ubuntu

useradd -s /bin/bash -m -d /home/[USER] [USER]
Page 5 of 10« First...34567...10...Last »