If you are performing unit tests on large PHP applications with PHPUnit, you may encounter the error “Too many open files”. It happens, don’t take it personally. This error occurs because the OS sets a maximum number of files (also known as file descriptors) allowed to be opened by a process, and inevitably this will [...]
Generate URLs from within a Twig Extension with Symfony2
It’s possible to generate a URL from within a Twig extension in a Symfony2 application. To do this, you need to have access to the Router. If you have a custom Twig extension, this means that you’ll need to inject the router to the extension. Thanks to the Dependency Injection this is very easy to [...]
How to setup multiple PHP versions on Apache
There are several reasons you might need to run multiple versions of PHP on the same server. Maybe you have a PHP 5.2 application running on your server and you need to start working on another application based on a new framework like Symfony2 or Lithium? Perhaps you haver a client with a legacy site [...]
Developer productivity tip: VirtualDocumentRoot
By Pablo Godel If you run a local Apache web server, you are probably familiar with the directive VirtualHost. It allows you to run multiple independent websites on the same machine. I use it all the time to develop my web apps and create fake hostnames, like example.local or site.local which allow me to access [...]
Symfony2 quick tip: generateUrl() with https on nginx
This week we upgraded our Control Panel to the latest Symfony2 code. The upgrade went fairly smooth but some things broke. One of them was the generateUrl() method that creates a link to be used in your templates/controllers. Our code looks like this: $link = $this->generateUrl(‘route_name’, array(‘id’ => $id), true); This should generate a link [...]




English
Español 
![php[tek] 2013](http://blog.servergrove.com/wp-content/uploads/2013/01/tek13.png)


