Posts

Showing posts from April, 2009

osCommerce & Register Globals

What happens when your web host finally get's around to upgrading to php5 and MySQL 5? Here is what happened to me in order: 1. Rejoice because finally your website is hosted according to industry standards. 2. Panic because you are unprepared. 3. Worked through the night to get the website updated. In order to migrate an osCommerce website from php4 to php5 there is really only one thing you need to worry about and that's a little "feature" in php called, Register Globals. Register Globals makes every variable contained in the URL, POST, SESSION and ENVIRONMENT directly available in every script. What this means is that with register globals turned on, you can write a webform that posts a variable to a script and that script can refer to the variable in the POST by name. For example: <?php /* ** Example script to show what happens when register globals is turned on. ** ** A form will submit POST data to this website as follows: ** String $_POST['name'];

Recycling old computers

I have an old PIII at home with 256Mb Ram and a 20Gb hard disk. Graphics is nothing to write home about and it will not support Vista or KDE 4.2. I know there are many, many blog posts on the internet that discuss this so I will simply add to the general wash. Ubuntu Server: File server with samba Apache webserver with dyndns.com ( free dynamic IP to Domain Name resolution ) - This can be useful if you are a freelance website designer / programmer and you need to publish draft websites for your clients prior to going live. Xbuntu Desktop: Install Childsplay - a very basic suite of games that are designed to develop mouse and keyboard familiarisation in a fun and easy to understand environment. - In fedora this was just as simple as, "yum install childsplay" Install the Mame Emulator and download roms for some of those neat and safe for kids arcade games that you played in the 80's at your local cornershop or arcade. If you have an XBOX controller - install the drivers

Write .NET applications on Mono and use them in Windows

Image
I am no professional .NET developer but I thought I would have a crack at a simple application written on my Fedora 10 in the Monodevelop IDE and then run the same exe it compiles in a Windows XP. It took a while but I got there in the end and in retrospect it was not too hard. Just a few dependancies, a short forum-search for a solution to a small problem. Here is what I did: 1. Install mono, monodevelop and gtk-sharp ( GTK# ): The monodevelop IDE provides a gui designer for gtk#. So I thought I would try this out and see how I could get that working in windows too. In Fedora I just ran the following: # yum install monodevelop gtk-sharp* As usual I let yum decide dependancies for me. 2. Start monodevelop and create a new solution: Select the C# templateand then pick Gtk# 2.0 Project Under Solution name: type "tutorial" and under Name: type "myGuiApp" to create a Gtk# GUI application under the folder {$HOME}/Projects/tutorial. Click Forward and select your Targ

Blogger Templates

I have changed the template only slightly. It seems that this default denim template also has a "wide" option. The colours and widgets remain the same. The only difference is that source code can now be read more easily as the layout will stretch with the browser.

CSS Floating Box Model

A simple floating box model example showing how to "float" div elements within another div element. This example includes boxes that float left and boxes that float right. It is easy to imagine how one could beef up the aesthetic quality of these floating boxes with rounded corners or varied background colours or patterns. The boxes used here are for demonstration purposes only. <html> <head> <title>Floating Right and Wrapping</title> <style> #maincontent { display:block; width: 600px; margin: 0px auto; } .wrapcontainer { float:left; width:600px; padding: 5px; border: 1px solid #777777; margin: 5px; display: block; font-family: arial,helvetica,sans-serif; } .sidebar-right { float: right; border: 1px solid #777777; padding: 5px; margin: 5px; display: block; width: 210px; font-family: arial,helvetica,sans-serif; } .sidebar-left { float: lef