-
06.09.11 - "Unable to write cache file" problem in Symfony 2
One common issue in Symfony 2 projects is that the "app/cache" and "app/logs" directories must be writable both by the web server and the command line user. On a UNIX system, if your web server user is different from your command line user, you can run the following commands just once in your [...]
-
20.08.11 - Fixtures in Symfony 2
The fixtures is a data configuration for our Symfony 2 project, is a simple but a powerful way to load into the database default or required information for the correct execution of the application. Often, in the development phase, the model changes or even dropped, as the recovery comes tedious [...]
-
16.08.11 - Add third party libraries to Symfony 2
Adding libraries that follows the PHP 5.3.+ with namespaces is trivial, but how we can add an old PHP library without namespaces?For example, if we want to add a library like which haves an old style format (lower than 5.3.+), not follows the standards and it not have namespaces, we have to do a [...]
-
15.08.11 - Extending Twig in Symfony 2, add custom functions
Sometimes we need to add some custom functions to the view. In Symfony 1 we have the helpers, in Symfony 2 we must extend Twig in order to add it.At first, we have to connect our future Twig extension to the Dependency Injection Container in our Bundle. If we don't got any config file we have to [...]
-
12.08.11 - Reconfigure Apache to use Plesk vhosts
Sometimes the Apache configuration for the virtual hosts magically disappear when you update to a major version of Plesk.An easy way to restore it is to reconfigure Apache through the command-line running the next command:
-
14.05.11 - PHP function for spanish DNI validation