Symfony 1.4 Doctrine 1.2 MS SQL Server

Web server: Linux (Ubuntu on my dev setup), Apache, PHP 5.3, Symfony 1.4, Doctrine 1.2.
Database server: Microsoft Windows 2008 Server, MS SQL Server

Trying to get Symfony to talk to the database server has been a painful experience for the last few days. But perseverance has paid off.

Lots of Googling with trial & error has resulted in actually achieving a development setup that will mirror the eventual production setup.

Short version:

  1. Follow the FreeTDS and ODBC setup instructions of
  2. Use the following in config/databases.yml
    class: sfDoctrineDatabase
        dsn: dblib:dbname=datasourcename;host=sqlserver;
        username: ###
        password: ###

In the above snippit, replace ‘datasourcename’ with whatever you used in /etc/odbc.ini and replace ‘sqlserver’ with the name used in /etc/freetds/freetds.conf & /etc/odbc.ini

It’s late and I’ve been struggling to get this working for some time. I may expand this entry in the future if required.

References and insperation:


Google calendar in Mozilla Thunderbird on Ubuntu 11.10

Via the Ubuntu Software Centre:

  1. Search for thunderbird
  2. Click on the search result “Thunderbird Email” and then on the “More Info” button
  3. Enable at least the “Calendar Extension for Thunderbird – Google Calendar support (xul-ext-gdata-provider)”
  4. Install the add-ons
  5. Open your Google Calendar in your web browser
  6. In the left-hand column, under “My calendars”, hover over the calendar of choice and click the down arrow that appears after the calendar name
  7. Select “Calendar settings”
  8. Close to the bottom of the page will be the “Calendar ID” (in my case it is my full email address. Make a note of this ID.
  9. Start up Thunderbird upon completion.
  10. File -> New -> Calendar
  11. Select “On the Network” and click Next
  12. Select “CalDAV”
  13. In the Location field enter:
  14. Click Next then enter a name for the calendar and set an email account against it
  15. When prompted, enter your username and password for accessing this calendar

upstart failing to manage mysqld on Ubuntu 10.04

Installed Ubuntu 10.04 from ISO onto a blank virtual box machine.

All worked well for a while, until I recently did an aptitude safe-upgrade.

The next time I booted the system, mysql failed to start and refused to do so when I issued: sudo service mysql start

It would just hang there.

Tracked the issue down to this bug. How I maged to get get it to work:

In a terminal: sudo /usr/sbin/mysqld

In another terminial:

sudo service mysql start
sudo service mysql stop
sudo killall mysqld

Now mysql will start and stop on the system as it should.

[nb: this is a rough artical, I will flesh it out when I have more time]

[edit 27-05-2010: this is not a permanent fix and requires to be executed after every system start. Looking forward to a fix on this…]

[edit 22-06-2010: see Ryan’s comment to fix this issue. I hope this helps others :)]