Posts Categorized: Tech


Symfony + Doctrine on the command line using the wrong database

So, one us pilots was trying to use Doctrine migrations to update a database on one of our servers. However, Doctrine was sternly refusing to use the correct database, as configured in the database.yml file. As it turns out, using Symfony from the command line skips the usual route through the /web/yourapplication.php file (e.g. backend.php or frontend.php). As a result, the environment is not properly set when reading the database team management app.yml file, and instead the last database connection specified is used. Lame. The trick is to specify the environment from the command line, so this file (and the other config files) do what they’re supposed to:


symfony doctrine:migrate --env=staging frontend 119

where “staging” is whatever the environment is you want to use (to match the name in the database.yml file).

Symfony / Doctrine – update a record using models

The Doctrine manual is really, really confusing in places. If you want to do something as simple as updating a record, the examples suggest that you use Doctrine_Query::create(). This doesn’t make a lot of sense, because we only want to manipulate the model, we shouldn’t have to even look at a query. (more…)

Fix for Adium Not Working with MSN Messenger Bug

For the last few months, I haven’t been able to use MSN Messenger with Adium. I’d log in, but it would just hang endlessly. Searching the bug reports was frustrating, and didn’t provide any insights. Today I found this obscure post which gives the solution. Apparently M$N changed the default connection settings without Adium making the change on their end to your account automatically. To resolve this, open the Preferences panel and Edit the account in question. Choose the Options tab (I didn’t even know this existed) and set Login Server to messenger.live.com, Port to 80 and turn on (check) the Connect via HTTP box. Once you turn back on your account, everything should be working fine.