Tag Archives: Symfony

Extending plugins in PHP and Symfony

Plugins are great but they are never what you exactly wanted. When they are designed properly, the best way to customize them is to extend them instead of directly editing them. Now, imagine I have:1 # Penguin.class.php class Penguin { public function __construct() { echo "Windows is bad\n"; } }# Penguin.class.php class Penguin { public […]

Posted in PHP, Symfony | Also tagged , , , , | Leave a comment

PHP serialization optimization

I recently had to use the serialize() function to store objects in Memcache. However, I realized that a lot of these objects (Propel objects precisely) were unnecessarily huge when stored: they had a lot of properties with quite long names having their default class value. That’s when I realized I could use the __sleep() function […]

Posted in PHP, Symfony | Also tagged , , , , | Leave a comment

Symfony and lighttpd

Update: I have written a tool than can generate automatically the proper configuration and much more! I’ve seen some articles on how to configure lighttpd to serve a Symfony project, however they usually did at least one mistake: Assuming that requests with periods (‘.‘) are for static files (the period is a default separator in […]

Posted in Symfony, Sysadmin | Also tagged , , , | 5 Comments