
This is a symfony 1.0 project, but I think everything applies equally to 1.1, except the command syntax has changed from propel-load-data
to propel:load-data
In this case, the application helps nurses collect and analyze data about how they’re administering intravenous therapies to their patients. At first they wanted plain text lists of the IV drugs and fluids, but in order to filter based on them, we needed to change them to discreet fields. In the View, it means changing a couple of fields from plain text to arrays of checkboxes. In the Model, it means adding separate tables, and a “through class” associating the therapy with the new class.
For some reason, even though I’ve set default properties in my .subversion/config, it doesn’t always apply to new files, so I end up doing this once in a while:
svn propset svn:keywords 'Id Rev URL HeadUrl' \ `find apps/ config/ doc/ lib/ web data/ test/ \ -name '*.php' -or -name '*.yml' -or -name '*.css' -or -name '*.sql'` |
This tells Subversion to go into those types of files and update the $Id$
and other keyword tags.
(Note, I’ve been fooled before by not noticing the keywords are CASE-SENSITIVE. If you set them to ‘id rev url headURL’ they will NOT work!)
It works with Cygwin, if you’re stuck in Windowsland like I am for local development.
Problem:
On my corporate image Windows XP laptop, “My Documents“, “My Photos“, “My Music” etc. secretly live on my (uber redundant, backed up, etc) network home directory. That’s a great idea for most things, but when I’m away from the network, iTunes can’t find its index files and complains at launch, saying,
The folder “iTunes” cannot be found or created, and is required. The default location for this folder is inside the “My Music” folder.
Complications
- You can change where iTunes keeps the actual music files in the iTunes preferences (Advanced tab, General tab, “iTunes Music folder location”), but the files where iTunes stores the details about your music collection (notably iTunes Music Library.xml and iTunesLibrary.itl) live in your “My Music” folder by default.
- If I recall, the Win2KMyMusicFolder value in HKEY_CURRENT_USER\Software\Apple Computer, Inc.\iTunes tends to get overwritten by iTunes updates. I’m not sure about that though– hacking it might be enough too.
- The “My Music” Shell Folder registry key, in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders, gets reset by my corporate login script whenever I log in, so changing it doesn’t help.Otherwise, I think hacking it would have been sufficient.
Solution:
- Copy the iTunes directory from your existing My Music directory (in my case my network home directory) to your new location (in my case, C:\Documents and Settings\myusername\My Music).
- Create a new REG_EXPAND_SZ registry key named “My Music” in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders and set it to %USERPROFILE%\My Music.
- Log off of Windows and log back in.

I had read this in Scot Hillier’s book but I couldn’t find it in the index or quickly Google it up today so here goes for future reference.
When you create a SharePoint “portal” site in Microsoft Office SharePoint Server 2007, you get this navigation on the front page, and odds are it’s not what you want:
The solution was not in any of the Site Settings places I looked, but instead (from Hillier):
- Click the Sites tab in MOSS to open the Site Directory.
- On the Sites Directory page, click View All Site Content.
- On the All Site Content page, click the Sites list.
- On the Sites list page, select Settings->List Settings from the drop-down menu on the list toolbar.
- On the Customize Sites page, scroll down to the Columns section and click either the Division column or the Region column.
- On the Change Column page, change the list of available options and click the OK button. Alternatively, you could click the Delete button to eliminate the column.
On a more personal note, MOSS makes me nauseous.
Last week I upgraded my first symfony 1.0 project to symfony 1.1 following the UPGRADE file that comes with symfony 1.1
The first part of the upgrade went pretty smoothly, but my project broke due to the sfGuardPlugin. There weren’t any details about plugins in the UPGRADE doc, and removing and reinstalling it didn’t work for me.
However, this week, with the help of some friendly symfony forum users, this procedure finally worked for me:
svn rm plugins/sfGuardPlugin svn ci plugins/sfGuardPlugin -m 'removed old version of sfGuardPlugin' rm -rf plugins/sfGuardPlugin plugins/.channels plugins/.depdb plugins/.depdblock plugins/.filemap plugins/.lock plugins/.registry/ rm -rf cache/.pear ./symfony plugin:install sfGuardPlugin svn add plugins/sfGuardPlugin/ |
my successful plugin installation looked like this:
$ ./symfony plugin:install sfGuardPlugin >> plugin installing plugin "sfGuardPlugin" >> sfPearFrontendPlugin Attempting to discover channel "pear.symfony-project.com"... >> sfPearFrontendPlugin downloading channel.xml ... >> sfPearFrontendPlugin Starting to download channel.xml (663 bytes) >> sfPearFrontendPlugin . >> sfPearFrontendPlugin ...done: 663 bytes >> sfPearFrontendPlugin Auto-discovered channel "pear.symfony-project.com", alias >> sfPearFrontendPlugin "symfony", adding to registry >> sfPearFrontendPlugin Attempting to discover channel >> sfPearFrontendPlugin "plugins.symfony-project.org"... >> sfPearFrontendPlugin downloading channel.xml ... >> sfPearFrontendPlugin Starting to download channel.xml (639 bytes) >> sfPearFrontendPlugin ...done: 639 bytes >> sfPearFrontendPlugin Auto-discovered channel "plugins.symfony-project.org", alias >> sfPearFrontendPlugin "symfony-plugins", adding to registry >> sfPearFrontendPlugin downloading sfGuardPlugin-2.2.0.tgz ... >> sfPearFrontendPlugin Starting to download sfGuardPlugin-2.2.0.tgz (18,589 bytes) >> sfPearFrontendPlugin ...done: 18,589 bytes >> sfPearFrontendPlugin Failed to download symfony/symfony (version >= 1.1.0, version >> sfPearFrontendPlugin <= 1.2.0, excluded versions: 1.2.0), latest release is version >> sfPearFrontendPlugin 1.1.1, stability "stable", use >> sfPearFrontendPlugin "channel://pear.symfony-project.com/symfony-1.1.1" to install >> sfSymfonyPluginManager Installation successful for plugin "sfGuardPlugin"
Then I did the first couple of steps from the install again to get it working:
$ symfony propel:build-model
$ symfony propel:build-sql
$ symfony cc |
But grrr… my customized authentication and signin forms are hosing it up. Time to learn more about the new release I guess.
I just released bhLDAPAuthPlugin to the world with permission from my employer. I’ve been using symfony (“PHP on Rails”) for about a year at work for a few intranet projects, and over and over I have needed to use our enterprise-wide Microsoft Active Directory® for user authentication and authorization. The plugin might work with non-Microsoft LDAP servers too, but I don’t have any of them to play with.
Maybe this will help other developers cook up Intranet apps that rock using symfony.
I have been able to rapidly develop some things that users really like with symfony, so I appreciate this chance to give back to the project. Also, I’m the only one in my organization doing this sort of thing, so I hope I’ll be able to get some good feedback and contributions from others.
Whee. I finally did it, though it’s been on my list for a couple years. I wanted to use the sweet todo-ticketing goodness of Hiveminder.com, but my mesozoic Palm T|X handheld was holding me back, and I’ve got several reasons for not throwing it out/replacing it with an iPhone/iPod Touch, yet.
I’ve been using the script all this week and it works great! I’ve been adding/collecting tasks like crazy, and even getting more done too.
It’s probably pretty geeky so far. It’s a long way from being a polished executable or something. But it works pretty well for me and I even improved the speed over version 0.1, so I wanted to share it with The World Out There ™
An excerpt from the POD:
WHY?
I use a Palm (TM) handheld for working all my lists offline, but Palm is stuck in the 20th century. Luckily, so is Outlook (TM)! The Palm knows how to sync with Outlook task list and memos, so this script syncs them with Hiveminder. Hopefully, I can use Hiveminder when I’m near a computer (online) and still have full read/write access when my Palm is offline.
From my work intrablog, Tuesday, April 29th, 2008. I tested today and the same patch is necessary.
It’s annoying how much harder this is than the MySQL driver…
- Download these RPMs from Oracle’s Instant Client for Linux page:Instant Client Package – Basic: All files required to run OCI, OCCI, and JDBC-OCI applications Instant Client Package – SDK: Additional header files and an example makefile for developing Oracle applications with Instant Client [just for future fun] Instant Client Package – ODBC: Additional libraries for enabling ODBC applications
- Installify them,
$ sudo rpm -ivh oracle-instantclient-*.rpm
- Get DBD::Oracle
sudo cpan
cpan> look DBD::Oracle
- Look at README.linux.txt
- Set up the environment
export ORACLE_HOME=/usr/lib/oracle/11.1.0.1/client/lib export LD_LIBRARY_PATH=$ORACLE_HOME export LIBPATH=$ORACLE_HOME export ORACLE_DSN="DBI:Oracle:host=myhost;sid=MYINSTANCE" # remember to quote the ; export ORACLE_USERID=myusername/mypassword
- I had to patch the Makefile.PL (sent changes to the maintainer) to find the header files with a longer “client_version_full”:
# diff -u Makefile.PL Makefile.PL.dist --- Makefile.PL 2008-07-31 10:53:00.253634000 -0800 +++ Makefile.PL.dist 2008-07-31 10:51:49.327631000 -0800 @@ -1538,7 +1538,7 @@ if (!$client_version_full) { print "I'm having trouble finding your Oracle version number... trying harder\n" unless $force_version; - if ( $OH =~ m\.\d+\.\d+<strong>(\.\d+)?</strong>)! ) { #decode it from $OH if possible + if ( $OH =~ m\.\d+\.\d+)! ) { #decode it from $OH if possible $client_version_full = $1; } elsif ( "$OH/" =~ m!\D(8|9|10)(\d)(\d?)\D!) { # scary but handy
- Install normally:
perl Makefile.PL make make test # a few minor failures make install