February 1st, 2009 | Tags: , ,

This is the absolute minimal setup I was able to find to get a continuous integration server running for Symfony that would report a failed build if any of the project’s unit tests failed. I tried a couple different CI servers and Hudson seemed to be the best mix of easy to install, configure, and use that was also free/open-source. Read more…

January 29th, 2009 | Tags: , , , ,

Having your site respond with content to requests on both domain.tld and www.domain.tld can give the appearance to search engines that your site has duplicate content, so don’t do it. Here’s how: Read more…

January 28th, 2009 | Tags: , ,

I recently wrote a tip about how to overcome issues when working with mod_rewrite, PHP_SELF, and configuration settings within the main server or virtual host context as is recommended in the Apache documentation on Per-directory Rewrites (scroll down to the notes). This post will explain the specific changes needed to do this for the Symfony framework. Read more…

January 23rd, 2009 | Tags: , , , ,

Want to use your favorite PHP framework without it’s .htaccess file by moving those settings into your httpd.conf but it’s not quite working out? This is probably because some of those settings in the .htaccess file are rewrites and the PHP framework you are using uses a front controller that relies on the PHP_SELF server variable. When you moved those rewrites into the httpd.conf file, PHP_SELF doesnt get populated correctly by Apache. To workaround this issue simply give each RewriteRule the PT (passthrough) flag (as pointed out in https://issues.apache.org/bugzilla/show_bug.cgi?id=40102#c11). This works well for Elgg and Symfony—I’ll post more detailed instructions for those two popular frameworks soon.

January 20th, 2009 | Tags: , ,

I created a comment plugin for Elgg 1.2 with AJAX effects, but it wouldn’t load the return value from the form submission properly—it would load the entire dashboard page. For some reason Elgg was outputting the location http header causing a redirect. The solution? Set PHP’s output_buffering setting to ‘off’.

January 16th, 2009 | Tags: ,

It is according to a recent article entitled CNN – is Microsoft Vista dead?

But that makes the assumption that just because Microsoft is replacing Vista, Vista is dead/abandoned and, because it is being replaced, it is an inferior product. Or maybe they are thinking that because Vista is so new and is already being replaced that it is clearly dead and being abandoned by Microsoft. Let’s take a closer look at that aspect. Read more…

November 5th, 2008 | Tags: , ,

Note: If you are using Symfony 1.2, follow these instructions instead.

I came across a slight problem with how the Symfony framework outputs title tag data: it outputs it both to the title element as well as to the meta element with name=”title”. This duplicated data is not optimal and may be considered “spammy”.

In looking to remove one of these, there wasnt an obvious solution, but I finally found this blog post with a solution except there were a few minor drawbacks (especially that it removes the title setting completely and so the title is unavailable after a call to include_metas) to that particular solution so I tweaked it as follows to answer those concerns.

Read more…

July 18th, 2008 | Tags: , ,

Ever wanted to have a layout in Symfony that allowed a template to pass it information about what to display in a more structured manner than slots allow? Well, here’s how to do it. You still need to use slots to avoid the caching issues described in http://trac.symfony-project.org/wiki/Symfony11LayoutUpgrade, but it is pretty easy to do once you know how.

For example, you have to basic page designs using the same layout, you just need to set a css class on the body element so your stylesheet knows which design to display. The default design is with no css class set and the alternate design is in effect when the css class is set to “alternate”.

You would normally do this with a simple slot in your layout:

<body class="<?php if(has_slot('bodyClass')) { include_slot('bodyClass'); } ?>">

Then, for any view that needs the alternate design, put this in its template:

< ?php slot('bodyClass') ?>alternate< ?php end_slot() ?>

Now, this will work well for a while—until you want to change the class name from alternate to something else and you realize that you now have 50 pages to go edit. Is there a way to avoid this maintenance horror?

Read more…

July 18th, 2008 | Tags: , ,

If you want to remove a user from the My Account -> Account Access screen of AdSense and there are no Actions available, you likely have a linked AdWords account and will need to do it there. Go to the My Account -> Access screen of AdWords and click on the Terminate access link next to the user you want to remove. This will remove them from both AdWords and AdSense.

June 4th, 2008 | Tags: , ,

To successfully install Aptana RadRails into Eclipse without installing the full Aptana Studio:

Read more…