Symfony 2 and ZipArchive - class not found!

It was crazy. I was trying to make my ZipArchive work and I know now, that it was already working just Symfony2 did not knew about it!

Fatal error: Class 'Demo\AcmeBundle\Controller\ZipArchive' not found 

php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file or directory while installing php zip

I was trying to use ZipArchive, but i got an error:
Fatal error: Class 'ZipArchive' not found
Then I started to Google how to install zip extension on my Ubuntu Apache 2 server. I have PHP version 5.3.10 and in configuration it says, that zip is enabled. This information you can get with these 2 simple commands:

How to use template engine in Symfony 2?

Symfony 2 comes bundled with Twig template engine, so you definitely want to use it. Twig template engine has everything what you need to keep your business logic out of templates and stay on MVC pattern, which is used in Symfony 2. The best thing about Twig template engine is that in many cases it is even faster than raw PHP, because finally it renders to raw and optimised PHP code.

How to join 2 SQL tables with PHP? Examples and visualisations

Often you need to join data from 2 tables. You can do it with several SQL queries and PHP, or just use JOIN functions. The JOIN keyword is used in an SQL statement to query data from two or more tables, based on a relationship between certain columns in these tables. Most popular joins are INNER JOIN, LEFT JOIN, RIGHT JOIN and FULL JOIN. It's always good to know the different.

How to hide post footer in blogger all posts or archive view?

In Blogger's configuration you can choose what to show in the footer of your posts, but there are only global footer options for all views of your posts - view of one post, view of all posts list or archive. To hide blogger's post footer in all posts view and in archive view, use this JavaScript custom code. It is fast and super lightweight:

How to add custom HTML/JavaScript to Blogger blog?

No matter what you need - add your custom adsense or analytics code or make some new feature, if you need to add your custom HTML/JavaScript code it is easy to do without changing your blog's theme. Follow these steps:

How to start with git versioning?

Git versioning is technique to make versions of your code. It's great for backuping and managing bugs in code. There are some popular sites which gives you ability to start versioning easy. Some of them are free only for public project, some are free for both public and private projects. Most of them are doing pretty same task - enabling you to versionise your precious code.

After update of VirtualBox virtual linux cannot see eth0 or eth1 network card devices. No connection, how to fix it?

 I have a local network with my virtual machine. I have updated VirtualBox and my network with virtual linux crashed. No network devices were found, nothing helped. The problem was with old configuration of network card's MAC addresses.

What is a Favicon? Where can I get it? How add favicon to my site?

Most website have favicon and it's great to have one. It helps your user to find your page easier between his/hers bookmarks or opened browser's tabs. Generally favicon means favorite icon, you can find it here:

What is the different between HTML CSS PHP and JavaScript?

What is the different between HTML CSS PHP and JavaScript?
That's a good question. It's very important to understand this different before starting to develop any website. So let's dive in:

HTML - it's like bones for your site. It says what to display on the user's browser: Tables, titles, paragraphs, lists, links etc. It is client-side language which is understood by browsers like Google Chrome, FireFox, Safari.

How to get free template for a website?

That's an easy question. Just go to and you are almost done. There are lots of free templates for Joomla, Drupal, WordPress or Blogger. You can search by color and choose your best match for free.