Wednesday 26 January 2011

Virtual Nightmare

Those of you who have anything to do with websites will notice that there is a quiet revolution going on in the hosting services section. It is to do with upgrading from PHP 5.x to 5.3. The revolution is because a lot of the ecommerce websites that use OS Commerce and Zencart will stop working on the day their hosting service upgrades its servers to PHP 5.3. as thier software is not compatible with PHP 5.3 I have been trying to make sure the sites I look after are all up to date and ready for the date when their host upgrades. That presented me with a problem because my testing server is already running on 5.3 so I can't do trial updates. I needed a web server running PHP 5.2. I know the so called easy way of upgrading is to buy a new template or to load a blank copy of the shop and then enter all your goods into the new shop but that is costly in time and resources and your shop is offline till you have completed it.

I have never used virtual machines before so when it was suggested I install a couple on my Windows 7 machine and run the servers there I was a bit anxious to say the least, but I am always game to try something new so I downloaded Windows virtual machine and XP mode and away I went. It all installed just fine but XP mode will only run at 1600 x 1200 x 16 bit colour which makes the screen somewhat hard to read. It turns out that this is a well known bug that Microsoft are not breaking their necks to do anything about. This makes makes MS Virtual machine useless for developing web sites so I fired up Google and went looking for a better Virtual machine. The one I chose is Oracle VM Virtual Box because it is a good fit with my hard and soft ware.


Installing didn't seem to be difficult and so I went on to install a copy of XP Pro I had left over from previous my computers but I struck a snag when I couldn't get the virtual network card to link to my network. It took a good hour of digging through help files to find the solution but once I did, installing an antivirus program and my favourite FTP and HTML editors followed without a snag.

When I came to install the web server I hit another snag, my usual development web server is xamp and when I went to download the latest version I noticed it has been upgraded to PHP 5.3 so it was back to Google to find an alternative. I settled on Wamp 5 (now called WampServer since the upgrade to PHP 5.3) because it has all the elements I need (phpmyadmin, cpanel etc) but most importantly all the previous versions are still available and one of them runs on PHP 5.2. That solved the problem and in a very few minutes I had a virtual server that is a mirror of the one that hosts the two ecommerce site I need to upgrade.

This might sound a very long winded way of doing things but as anyone who runs an ecommerce site knows, if you give the hackers a tiny crack to get into they will find it and they can do untold damage. Working this way I can lock off the rest of my computer and network so that the hacker might get to the site I am testing but no further. That is possible to do just running web server software on Windows 7 but it has been shown it is so easy to hack a system setup like that which makes it a dangerous thing to do.

I now have two fully functional copies of the two ecommerce sites running on my virtual servers and can start the delicate and, on first sight, complicated task of upgrading them to be PHP 5.3 compliant.

I have written this really to ask you folk out there if this is the best way to go about solving a problem like this or do you know a better way. If you do I am all ears.

No comments:

Post a Comment