Wednesday 31 December 2008

Happy New Year!

(What more is there to say?!)

I wish you all all the best for 2009 and look forward to 'seeing' you next year!

Until then... enjoy :).

Tuesday 30 December 2008

symfony - upgrade1.2 and Propel 1.3 DSN

Yup, I have been fiddling around with symfony some more!
Since I installed the latest stable build of symfony (1.2.1), I decide to upgrade my projects using:

symfony project:upgrade1.2

The command processed fine but then all hell broke loose so to speak. Basically, the whole project went kaput. So...
I then ran the magic (that is in the non-PHP sense) command:

symfony plugin:publish-assets

Which fixed all my sfGuardPlugin issues!

My next problem was related to propel. I had my databases.yml file configured like so:

all:
propel:
class: sfPropelDatabase
param:
phptype: mysql
database: anxcity
dsn: 'mysql://root@localhost/anxcity'

I kept getting an Access denied error for user 'ODBC' which was strange since my DSN contained the user: root.

So... I tried the long form of the databases.yml declaration like so:

all:
propel:
class: sfPropelDatabase
param:
phptype: mysql
hostspec: localhost
database: anxcity
username: root
port: 3306
encoding: utf8
persistent: true

Then the system complained it wasn't receving the DSN string as planned.
So... I just added it:

dsn: mysql:dbname=anxcity;user=root;host=localhost;port=3306

That seems really trivial BUT ... you do need to use the exact string syntax for it to actually work (which is very different to the DSN string in my original configuration file).
And hey presto!

Thoughts?

Edit:
Ah yes, forgot to say I had to rebuild the model too, using:

symfony propel:build-model

Sunday 28 December 2008

symfony - Ajax is not defined

I have been working on a small Ajax project using symfony - really trying to figure out how to get the nifty ajax functionalities working (using link_to_remote for instance).

I kept getting Ajax is not defined or Draggable is not defined errors and spent a couple of hours searching for the solution. Anyway, I finally came across this command:

symfony plugin:publish-assets


This got it all working for me - it simply copied the 'assets' (js scripts) to my /web folder. Simple :).

More code soon...

Thoughts in the meantime?

Thursday 4 December 2008

Installing symfony - setting up the virtual host 2

Just a quick clarification on my previous post about setting up virtual hosts, which seems to be a little misleading.

You do also need to define your localhost as follows:

<VirtualHost *:80>
ServerName localhost
DocumentRoot "/path/to/www"
DirectoryIndex index.php
</VirtualHost>

(localhost should already be defined in your hosts configuration file).
This way you can still access all your other applications.

Thoughts?
Online Marketing
Add blog to our blog directory blog search directory Blog Directory Blogarama - The Blog Directory