Google analytics and the smarty template engine

April 11th, 2012

When trying to add the google analytics tracking code to a site that uses the smarty template engine you might find that the page returns a HTTP 500 server error.

The problem here is that smarty is trying to interpret the tracking code because it contains curly braces {}. The solution is to simply put the tracking code within a {literal} … {/literal} block within your template.

For futher details see http://systembash.com/content/using-google-analytics-or-other-javascript-with-smarty-template-engine/

Moving an OSCommerce website

April 7th, 2012

To move an oscommerce website, whether to create a development version, when moving between hosts or for any other reason follow the instructions found here http://kb.siteground.com/article/How_to_transfer_my_osCommerce_from_one_host_to_another.html. I also discovered this interesting looking tool during my research but have not managed to give it a try yet http://www.xcloner.com/.

Installing Subversion 1.6 on Unbuntu 8.04 LTS

March 19th, 2012

If you need to install/upgrade subversion to 1.6 on Ubuntu 8.04, you can follow the instructions provided here:

http://growingventuresolutions.com/blog/installing-subversion-svn-1-6-ubuntu-8-04-lts-hardy for instructions.

DateTimePicker event breakpoint causes Visual Studio 2008/2010 to hang (64-bit platform only)

March 18th, 2012

This was a strange issue that was discovered recently and does not seem to have been fixed in Windows / Visual Studio. As stated in the title it only occurs on 64-bit platforms when your application is compiled as ‘Any CPU’ or ‘64 bit’.

When a breakpoint within a DateTimePicker event handler is reached, Visual Studio hangs. The work-around we used was to configure the application as a 32-bit application while debugging.

There’s a documented summary of the issue here although it doesn’t look like Microsoft have got around to doing anything about it yet - https://connect.microsoft.com/VisualStudio/feedback/details/490277/

Move Thunderbird profile Windows XP Windows 7

March 17th, 2012

We have had to move profiles between PCs and between different versions of Windows (Windows XP and Windows 7) on multiple occassions now. The first link below has proven to be the simplest and quickest method we have found. The other two are ones we have used in the past and may be of use to in providing further background information.

https://getsatisfaction.com/mozilla_messaging/topics/how_do_i_move_thunderbird_from_a_pc_with_xp_to_a_pc_with_windows_7

http://kb.mozillazine.org/Thunderbird_:_FAQs_:_Changing_Profile_Folder_Location

http://kb.mozillazine.org/Moving_your_profile_folder

PHP Fatal error: Call to a member function toHtml() on a non-object in …/Mage/Core/Model/Layout.php on line 529

March 4th, 2012

The theme layout for the magento site needs to be updated to fix this issue…see http://www.meetc3.com/blog/solving-call-to-a-member-function-tohtml-magento-error.html for instructions.

Dump and import mysql databases to/from file

February 26th, 2012

Dumping and importing mysql databases to/from files is pretty quick and easy to do from the command line:

dump db to file: mysqldump -u username -p databasename > dumpfile.sql
import db from file: mysql -u username -p databasename < dumpfile.sql

Add wordpress blog to cakephp app

February 23rd, 2012

Adding a wordpress blog within a cakephp app was easily done by copying the blog into the webroot directory of the app and updating the .htaccess file in the root of the app…for details see http://planetcakephp.org/aggregator/items/1370-wordpress-into-cakephp-the-right-way

Deploy a wordpress blog

February 18th, 2012

Deploying a wordpress blog is pretty straight-forward…although it does required a few changes in the admin panel or directly in the database before moving the site. A pretty comprehensive list of scenarios is covered here http://codex.wordpress.org/Moving_WordPress.

Copy SQL Server database on same server

January 9th, 2012

Use the following instructions when you need to create a copy of an existing database on the same server.

- Create a backup of the existing database.
- Create the new database and select the task ‘Restore’
- Select the db backup file to restore, however as the backup is for another database on the existing server the option ‘Overwrite the existing database (WITH REPLACE)’ must be selected
- Before restoring the database, just check the filepaths where the database is being restored too!