PHP: Disable Xdebug for CLI

In most scenarios you won’t need Xdebug on your CLI. Also it is recommended to disable it if you use Composer . sudo php5dismod -s cli xdebug

February 10, 2015

Twig: Render String as Template

In case your template is not located in a file but in the database Twig allows you to render a string: $twig_env = new Twig_Environment(new Twig_Loader_String); $output = $twig_env->render('This is {{ foo }}', [ 'foo' => 'an ordinary string', ]); // $output now contains: This is an ordinary string

January 19, 2015

php5-mcrypt not working after upgrade to Ubuntu 13.10

If you are using the php5-mcrypt library in your projects you might experience that it’s no longer working after you have upgraded Ubuntu to 13.10. You can fix this with the following three commands I have found on stackoverflow [1]: sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available sudo php5enmod mcrypt sudo service apache2 restart [1] http://stackoverflow.com/questions/19446679/mcrypt-not-present-after-ubuntu-upgrade-to-13-10

October 21, 2013