Tuesday, 24 June 2014

Working with Regex

If you ever have to work with regular expression then I recommend testing your expressions on this website.

Friday, 20 June 2014

PHP Upload Limits on GoDaddy PHP5.ini


I developed a health and safety document management website which has been running without a hitch for around a month now. I had intentionally set file size limits to be 10MB and decided I would increase this limit as and when larger documents appear. Today a user was hitting an error with a 17MB document. I made all the changes necessary to my source code and put the change live, only for the user to report back that they received an error. Straight away I tried a 12MB document and it worked, I asked how big the file the user was trying and they told me 17MB. I did some research on the error message.

“Fatal error: Allowed memory size of 67108864 bytes exhausted”

A lot of results for that error message. I managed to find some tutorials on how to resolve the issue on GoDaddy. Unfortunately the information I found is outdated (or at least no longer applicable to hosting package I am on)

The articles suggest creating a php5.ini on the root directory adding the following configuration:

file_uploads = On
post_max_size = 128M
upload_max_filesize = 128M
memory_limit = 128M


However after speaking with GoDaddy support this is no longer correct (at least not for those on the Economy Linux Hosting with cPanel package)


To resolve the issue you must create a .users.ini file. 

Tuesday, 3 June 2014

Download Office / Visio 2013 offline installer

The network connection at our office is horrible, it’s a long story with very little light at the end of the tunnel. I have purchased a number of copies of Visio 2013, however software these days doesn’t seem to come with an installation CD any more. After registering the product key with Microsoft I was a little miffed to find that the installer they provide you with is only 900KB in size, clearly it was going to download the rest of the application in the background. Not great when I will have to repeat the install several times over.

This took me a while to find but it is possible to download an offline install for your Microsoft Office products.

Browse to office.microsoft.com
Login to your account
Click Install Office
Click install from a disc
Click I want to burn a disc
Click Download





The download file is 2GB in size, I am not sure if this is JUST for Visio or if it includes other Office products that will be filtered by the product key. 

Friday, 16 May 2014

SpaceSniffer - another useful application

 Stop the presses! I can’t believe in all the time that this blog has been going that I haven’t once mentioned or credited an application that I've used countless times.



SpaceSniffer (http://www.uderzo.it/main_products/space_sniffer/) is freeware so what’s not to love? SpaceSniffer provides you with a visual representation of folders / file sizes on your hard drive. Today I ran out of disk space, I ran SpaceSniffer and managed to recover 30GB that was hiding in SQL Express (a database I had restored for testing and a transaction log file). It’s simple and intuitive to use.

Wednesday, 16 April 2014

Spam

I have a strange fascination with Spam, its something that really intrigues me. I felt like I just had to post the following bit of spam I received. It didn't ask me to click to verify my bank account details, there was no attachment (with a virus) and it doesn't seem to be trying to sell me anything. It appears to be a combination of random sentences taken from Wikipedia.

It makes so little sense that it actually made me smile.

"After we wrote it, we thought it sounds just like a Blake Shelton song. Also Puerto Cabello was at that time under Dutch control. It is simply a short length of material worn around the thighs rather like a sarong."

Tuesday, 15 April 2014

MySQL migration to MSSQL

I use a mix of database servers depending on what application / project I am working on, normally it will be either SQL Server (inc Express) or MySQL.

I find working with SQL statements in SQL Server Management Studio to be much easier than creating statements on the fly, so its useful to have a copy of the MySQL databases on my MSSQL server, previously I have manually created a new database with the tables / structure that I need to create my SQL statements.

That all changed when I came across Intelligent Converters (http://www.convert-in.com/)  They have a great bit of software that will copy databases from just about anything to anything, in this case MySQL to MSSQL (http://www.convert-in.com/sql2mss.htm) The trial version of the software is limited to copying only 5 records per table, that's perfect if you just want the structure of the tables, for $49 you can have the full version of the software and for $99 you can get the MySQL Migration Toolkit which will convert any data source to or from MySQL.

SQL Backup And FTP

Since moving to SQL Server 2005/2008 (including SQL Express at home) I've been using SQL Server Management Studio to create a daily database backup. In my home environment my databases are very small (mostly development projects) so I place these backups into a folder than is configured to synchronize with the cloud. I'm not too worried about full server backups as the database server has minimal configuration done to it. In my business environments I have daily backups that backup the full system (including my SQL backup files). 

Despite using the Management Studio for nearly 9 years now I know very little about it, so perhaps it has the functionality built within it and I just don't process the knowledge (nor did my search results) on how to backup SQL databases to a network location, I also wasn't really in the mood to go fiddling with scripts etc.

I came across a great bit of software called SQL Backup And FTP (http://sqlbackupandftp.com/) 

The most basic (free) version of the software has a lot of functionality and setting up a job is easy.