Archive for January, 2009

Symfony Notice: Undefined offset: 0 in /symfony/util/Spyc.class.php

Monday, January 26th, 2009 by The BCM Team

If you are getting an above notice in Symfony (especially after you clear cache) check your yml files. You are most likely missing a colon somewhere or have some other error.

For example:


setting
  id1: value1
  id2: value2

should be (missing colon):


setting:
  id1: value1
  id2: value2

Our Bookmarks: Jan 19 – Jan 25

Monday, January 26th, 2009 by The BCM Team

The Week That Was In Links

Development & Production

Promotion & Distribution

Monetisation

Technology & Infrastructure

Miscellaneous

Tips & Tutorials

Useful Linux (CentOS) commands

Monday, January 19th, 2009 by The BCM Team

Show directories by size: du -sk * | sort +0nr

Our Bookmarks: Jan 12 – Jan 18

Monday, January 19th, 2009 by The BCM Team

The Week That Was In Links

Development & Production

Promotion & Distribution

Monetisation

Technology & Infrastructure

Miscellaneous

Tips & Tutorials

Install GeoIP on CentOS

Thursday, January 15th, 2009 by The BCM Team
  1. Install geoip via yum:
    
    yum install geoip geoip-devel
    
  2. You also might want to download database with ip addresses from Maxmind website and place it in /usr/share/GeoIP (which is a default location of geoip upon installation).
  3. Install PECL extension:
    
    pecl install geoip
    
  4. Add extension=geoip.so to your /etc/php.ini
  5. Restart apache:
    
    /etc/init.d/httpd restart
    

Restore your Wordpress .htaccess file

Wednesday, January 14th, 2009 by The BCM Team

If you deleted your .htaccess file (or lost it somehow) here is how you can get the default one:

  • Create a new blank .htaccess file in your WordPress directory via FTP or SSH.
  • Change permissions to 777. Log-in to your dashboard. Navigate to settings, permalinks, and update permalinks (choose any option there). When done, change the .htaccess permissions back to 644.

Your GNOME desktop suddenly reverted to TWM in CentOS 5

Wednesday, January 14th, 2009 by The BCM Team

Has your GNOME desktop suddenly reverted to TWM upon a regular restart? If so, you are’nt alone.

Here is what you need to do to restore your GNOME desktop:

  1. Check if you can just get away with switching back to GNOME:
    
    yum install switchdesk
    switchdesk gnome
    

    If that tells you that gnome is not installed then proceed to step 2, otherwise you should have gotten your GNOME back.

  2. We are going to reinstall GNOME. To do that we need to install one package manually (because of the bug in “nautilus-sendto” package which is a part of GNOME. It requires “libgaim.so.0″ library which is a part of gaim (that was replaced by Pidgin in the latest CentOS distribution). Therefore, this dependancy will fail when running yum. Download nautilus-sendto and install it:
    
    rpm -Uvh --nodeps nautilus-sendto-0.7-5.fc6.i386.rpm
    

    We can now install GNOME by running:

    
    yum groupinstall "GNOME Desktop Environment"
    

    Now run the command to switch desktops:

    
    switchdesk gnome
    

    and you should be good getting your GNOME back upon next restart of your xwindow session (Ctrl+Alt+Bcksp).

Our Bookmarks: Jan 05 – Jan 11

Monday, January 12th, 2009 by The BCM Team

The Week That Was In Links

Development & Production

Promotion & Distribution

Monetisation

Technology & Infrastructure

Miscellaneous

Tips & Tutorials

Tools For Collaborating Remotely

Thursday, January 8th, 2009 by The BCM Team

An image of a man traversing a globe

This is a brief post on the tools we use for collaborating remotely.

Video Chat

Skype is our primary application for this.  However, since Google Mail’s recent release of video chat we have been impressed with the quality-of-service. It also removes the need to have yet another application running.  That said, we will certainly be sticking to Skype for all of our external communications.

Instant Messaging

Messenger, the golden oldie still works for us.  It has the added benefit that it’s one of the quieter ones in terms of noise.  If you are transferring large files while chatting, Skype is certainly faster and more reliable.  Pidgin is a universal IM client that allows you to connect to AIM, MSN, Yahoo, and numerous other networks all at once.  Annoyingly it can be a bit flakey sometimes but it certainly is useful.

Email

Due to the fact that all of our team have been long term Gmail users we decided to use Google Apps as opposed to Zimbra’s Open Source Edition.  Google Apps is a hosted solution that we found painless to set-up and configure.  Once you have played with your domain name settings you are good to go.  We all use email clients so that we have an additional back-up of all our work emails.  Despite each of us having our own preference, we all use one of the following clients Thunderbird, Mail (Mac) or Outlook (Windows).

IRC

Internet Relay Chat is one of the best ways to communicate and get questions answered online and we use it quite a bit.  Our favourite on Windows is the well-known MIRC client, and on the Mac it’s Colloquy.

Project Management

When we started out we were loyal users of 37signals hosted tools (such as Basecamp).  However, we soon found the recurring fees increasingly hard to justify. Don’t get me wrong they are great tools and I have, and will continue to, happily recommended them to others.  But seeing as though we had the skills to install and play with something, we thought we might as well give it a shot.

We soon had Mindquarry and Phprojekt installed and battling for our affections.  Unfortunately we didn’t really warm to either of them, and we quickly found ourselves looking for an alternative.  We finally settled on a mixed approach, combining the flexibility of an installed solution and the more user-friendly UI of a hosted solution.

We now use Trac for all of our technical tasks.  It is incredibly powerful and can be customised fully to meet your specific requirements.  It also has the added benefit of being open-source and having a first-class support community. For non-technical tasks we use a combination of Google Calendar and Todoist.   There has been much praise for Remember the Milk and Toodledo, and quite rightly so.  We played around with all of them but ended up settling on Todoist.

Word Processors

We use Open Office because it’s free and easy to use.  In fact the latest release (v3.0) has somewhat surprisingly totally killed our use of Microsoft Office.

Wiki

We use Trac’s built-in wiki engine, that is used for text and documentation throughout the system.   If you aren’t a fan of Trac or you just want a wiki you should definitely check out Mediawiki or Tikiwiki.

Version Control

We use SVN (Subversion) to maintain current and historical versions of our files such as source code, web pages and documentation.   Our favourite clients are Smart SVN (for Mac) and Tortoise SVN (Windows).

Mockups, Diagrams and Prototyping

We regularly use Mockups (see our review here), OmniGraffleDia and sometimes Visio.   Mockups is certainly our favourite at the moment as it not only suits the way we like to work but it also save us time.

Conclusion

As you can see by the recurring trend, “free” as opposed to “paid-for” is something we value highly.

All of the tools mentioned above have their own unique pro’s and con’s and this certainly is not an attempt to label any of these tools best-in-class.  Rather we wanted to share what we use and what works for us in our specific circumstances.

We hope this post is useful, and if there are any tools you think we should try, please do give us a shout!

Null and Not Null in Propel queries

Sunday, January 4th, 2009 by The BCM Team

Here is a quick hint on how to use Propel and its Criteria class to generate queries that need to have Null or Not Null in WHERE clauses:


<?php
$c = new Criteria();
$c->add(TablePeer::TABLE_ID, null, Criteria::NOT_EQUAL);

// this is the same as above
$c = new Criteria();
$c->add(TablePeer::TABLE_ID, null, Criteria::ISNOTNULL);

// ======================================

// for equality checking do this:
$c = new Criteria();
$c->add(TablePeer::TABLE_ID, null);

// or
$c = new Criteria();
$c->add(TablePeer::TABLE_ID, null, Criteria::EQUAL);

// or
$c = new Criteria();
$c->add(TablePeer::TABLE_ID, null, Criteria::ISNULL);

?>