Jun 12 2010

PHP – Large File Upload Issue

I’m currently working on a website project where we will be uploading large MP3 files to a Joomla site. Smaller MP3 files would load fine, but larger files just refused to upload. I checked all the obvious settings within Joomla, all of which were fine and set for 100MB max upload.

I then thought to check my php.ini settings, and sure enough upload_max_filesize variable=2M (maximum of 2MB), I changed this, restarted Apache and it still didn’t work!

Eventually I found out that PHP uses the POST method to upload files and an additional variable post_max_size was set too low. I upped the size, restarted Apache and ihey presto, upload of large files now worked fine.


Jun 3 2010

Smokescreen – a JavaScript Flash Player for the iPad generation

Most people will realise that Steve Jobs has got a bit of a strop on about Adobe’s Flash technology. He argues that Flash is buggy and a performance hog, hitting battery life and causing user crashes. Steve believes the way forward is to embrace HTML5 in all of its goodness.

I am a big fan of web standards and I think HTML5 is a great leap forward, however blocking Flash content on iPad and iPod devices causes issues for many markets including advertisers (yes – we get to feel sorry for advertisers today).

Smokescreen (http://smokescreen.us) have come up with a workaround that is very clever technically, however my opinion is that it circumvents the problem and does not resolve it. Smokescreen takes a Flash movie and renders it in JavaScript, thus allowing it to be run on Mr Jobs devices.

A solution to a problem to be sure, and the advertisers (bless their little cotton socks) will be happy as their investment in Flash is protected.

I’m not quite sure this is the ideal solution for the end user though, the JavaScript is quite large, and after my (admittedly cursory) glance at the technology I believe it will work  devices quite hard – thus coming full circle back to issues such as increased CPU usage and subsequent reduced battery life.

Let’s see how this one develops.


Apr 30 2010

Virtualisation – A great tool for website designers

Most of my client websites are designed using the Joomla Content Management System. This software requires several back-end server applications including Linux, Apache, MySQL and PHP. A lot of people still develop websites using a traditonal web-hosting provider, however this relies on someone elses server architecture, and the requirement that you have an Internet connection. When developing a site from scratch and you are constantly changing things, and trying out new ideas the slower speed can stifle your creativity, which is bad!

So, what to do? Well we could invest in a separate PC or server to run our website server applications. There is nothing wrong with this solution, especially if you have some unused and suitable hardware lying around that you can install Linux onto, however most of us don’t have that luxury.

Another option would be to use software that enables you to run your webserver application(s) concurrently with your existing desktop OS. This means utilising some from of virtualisation software.

This is my preferred way of working, and means I can take all my web development and server applications with me on the road, and can beaver away quite happily designing websites, even without an Internet connection. Another big advantage of this method of working is response times. Having your webserver sitting locally on your laptop means you are faster, and more productive. The whole website development cycle is simply more snappy.

There are a lot of different ways to implement a virtualised solution and I am a big fan of VMware’s products, having used them for more than six years. As an aside, I use their ESXi product for server consolidation, and VMware has a lot to recommend it. For website design,  I had previously used VMware Player, another free product from VMware that sits on top of Windows and provides support for running multiple operating systems on your PC. Recently however I have started using Virtual Box (now owned by Sun) and have found it very easy to use, very stable, and modest in hardware requirements. It seems slightly less heavy then VMware player, and I prefer their way of assigning network interfaces. There is even an OS  X version for you Mac afficionados!!

I have a Sony Dual Core laptop (Intel P8400 2.26Ghz) with 3GB of memory, and with this configuration I can comfortably run Windows 7 as my primary operating system, with Virtual Box handling my Linux server applications for my website design requirements. You can run virtualisation software on older machine, but I would recommend a fairly modern system, as running multiple operating system puts more strain on the processor/memory/storage subsystems.

Try and get a system that supports Intels VT-x or AMD’s AMD-V.  These are hardware features built into your CPU that will assist virtualisation software. It’s a nice to have (if you want to run a virtualised 64-bit operating system on a 32-bit host system it is a must) and will provide some performance improvements. For further info on this subject see here – hardware assisted virtualisation . Be warned it’s not light reading!


Apr 29 2010

HTC Desire – Add Voice to Text

Just recently received my new HTC Desire, an Android 2.1 phone, and very nice it is too. Unfortunately it does not come with the Google voice to text functionality built in, something I really wanted.

After digging around on the net (I recommend androidforums.com if you are new to the Android phone OS) I found the following hack, which requires you to download a couple of files (Google voice search and a modified keyboard) and you are good to go.

For full details go to - http://nimbu.amorvi.com/2010/04/add-full-voice-to-text-to-htc-desire

You can then use your HTC Desire for hands free dialling plus voice recognition for voice to text e.g. for sending text messages.


Mar 30 2010

The Great North Fly In

Some friends ran the 1st Great North Fly In last year at Eshott airfield in Northumberland. Even though the event was organised at short notice it was a great event (so I am told, unfortunately I was working that weekend) with over 100 aircraft attending during the weekend.

I was asked to design a simple website for the 2010 event and as all money raised from the event goes to the Help for Heroes Charity I was happy to oblige. You can visit the website at www.greatnorthflyin.co.uk


Mar 13 2010

Ubuntu Server – GD Image for PHP not installed

I was trying out a new Image Gallery for Joomla today (Simple Image Gallery from www.joomlaworks.gr – a great product, and free) when I came across a small problem. I primarily use Ubuntu Server 8.04 for my server side web development, and I discovered that the standard LAMP install within Ubuntu Server doesn’t install the GD image library.

As Simple Image Gallery uses this to produce it’s image thumbnails, I had to do a bit of digging to find the solution.

To install the required package use:-

sudo apt-get install php5-gd

Then restart your Apache server:-

sudo /etc/init.d/apache2 restart

Mar 4 2010

Latest Website

Just completed my latest website project, a caravan booking website for a colleague. Although it looks simple there is a lot of back-end logic to control caravan bookings and financial reporting. A good example of  a site with quite a lot of functionality that can be developed quickly and inexpensively in Joomla.

To visit the site visit – www.caravanspinewoods.co.uk.


Jan 27 2010

Apple iPad – No Flash?

Apple’s iPad looks great, it is a good size form factor, nice screen, capacitive touch display, Wifi (and optional 3G) plus great web browser. The only thing that concerns me is the lack of support for Flash. Sure it’s a non-Apple technology, but so what? Flash is so prevalent on today’s web that this really is a serious ommission.

Hopefully Apple will clarify it’s stance with regard to Flash support for the iPad and iPhone at some point. Until then I wont be purchasing an iPad.


Jan 21 2010

Nokia releases free Navigation software (or does it?)

Nokia today announced that Ovi Map 3.0 is now free of charge including full navigation, inc. turn-by-turn insturctions, voice prompts etc.

Sounds great, well yes,as long as you have invested in one of the followings phones. This is what is listed on the front page of Nokias website at http://maps.nokia.com:

Compatible devices: Nokia X6, Nokia N97 mini, E72, E55, E52, Nokia 6730 classic, Nokia 6710 Navigator, Nokia 5800 Xpressmusic, Nokia 5800 Navigation Edition, Nokia 5230. To find Ovi Maps for other mobile devices visit Maps Support

So – click on visit Maps Supports and you’ll find other clients, for instance for the Nokia N95 8GB (the phone I currently have). Great, so download and off we go. Well not quite, as what Nokia doesn’t make clear is that only the phones listed above have FREE navigation, the rest of us have to pay. A not so great reward from Nokia for investing in their products.

I think it is great of Nokia to up the ante, and offer this product “free” as it will entice certain users into purchasing, however I can’t really fathom the logic of not offering it free for other Nokia compatible headsets. Surely once they’ve made the decision of a free economic model to drive through handset sales, they may as well do it for their other handsets. I can’t see them making that much revenue of older phones.

Update

I’ve had a reply following a post I made on engadget that there is a March release scheduled for Ovi Maps 3.0.3 (the free licence version) that will run on Symbian S60 3rd Edition FP1  phones (such as my Nokia N95 8GB). If so then qudos to Nokia. However I can’t find this information anyware officially. Can anyone point me in the right direction?


Jan 20 2010

Joomla 1.5 Database Issues

I recently came across a problem with Joomla and MySQL databases when I was working on a clients website. I generally use a test server to develop Joomla websites, and then upload the final website to my web hosting provider. However, for reasons now forgotten I decided to develop this clients website as a subdomain under my main business website.

I almost always use JoomlaPack (http://extensions.joomla.org/extensions/access-a-security/backup/1606) to backup and restore Joomla websites. If you dont know this utility, go and check it out as it really is a time saver. I used Joomlapack to backup the Joomla site from my business website subdomain and restored it the newly created clients hosting account.

I then noticed that although the Joomlapack restore had worked the database had not copied for some reason and it was referencing the original location. As both of these locations use the same hosting provider, it worked, but obviously was not ideal as my clients website was now tied to my account.

I made a copy of the MySQL database and moved it across to the clients new hosting account, and changing the username and database name within Joomla administration backend. This did not work and I got the following error:

Database Error: Unable to connect to the database:Could not connect to MySQL

As the MySQL user password is different from the original MySQL user password then it can’t log in. Unfortunately Joomla only asks you for the database details including the password when you install Joomla. It is not available (unless i’ve missed it) within the Joomla administration back end. I could have reinstalled Joomla. but at this point I had my heels dug in.

Anyway – For anyone who has any issues like this then here is how I resolved it.

1. I used phpMyAdmin to make a export a copy of the clients Joomla MySQL database.

2. I imported the clients MySQL database in to their hosting account, again using phpMyAdmin.

3 I created a new MySQL database user and associated it with the clients MySQL database (make sure you set the correct user priveleges).

4. I edited the Joomla configuration.php file and changed the following entries to enable Joomla to point to the new database:

  • var $user = ‘database user’;
  • var $db = ‘database name’;
  • var $password = ‘user password’;

I was surprised that $password is stored unencrypted.