Ubuntu 14.04 PHPMyAdmin can’t find mcrypt extension

I am currently in the process of migrating all the blog content of this site over to my other site which is dedicated to all Information Technology , and is more focused on Software Development, Software Engineering and technology in general.

You will be able to find this post at the following URL

http://www.threenine.co.uk/blog/phpmyadmin-cant-find-mcrypt-extension/

We will be repurposing FitGeekDad over the next few months and it will be undergoing some very exciting updates!

Posted in PHP, Software Development, Ubuntu, Web Development Tagged with: , ,

Using SQL Server FileStream and FileTable Part 1

Over the past few years a common trend has started in using the database to store Binary Large Objects (BLOB),  i.e Documents ( pdf, .doc, .docx .csv, .xls etc)  or  Graphic images (.png, .gif, .jpg)  . The FileStream attribute was introduced in SQL Server 2008, and the implementation has further been improved in SQL Server 2012. The following video is an excellent resource to get you up to speed and provides some additonal background information.

I won’t be going through the setps of configuring your SQL server to use FileStream, only because the above video takes you through it for SQL server 2008, and there are a number of great blog posts out there that will assist you for SQL server 2012,

Personally I found this video, to be the most useful, well worth a watch. There is just loads of information, that this guy pumps out, and a lot of it really interesting.

Now that we’ve got all the knowledge as to what FileStream is and how to use it, we now need to put our developer hat on, and figure out how we use FileStreams and FileTables within an application.
The Solution
Generally most developers doing MVC or WPF work will be thinking cool, I’ll just use this with Entity Framework (EF) and I’ll be able to quickly be able to leverage file storage in my project, all will be cool with the world. Well not so fast my little codemonkey, it’s not that simple!  Unfortunately, at the time of writing anyway, EF does not support the sqlFileStream type, so unfortunately you will have to do some old school coding stuff to get it to work!  To my mind there is a very good reason for this, and some I think need further explanation.
1.) FileStream and FileTable softened security requirements and Disaster recovery
If you’ve watched some of the above videos, you would’ve picked up from something that Bob said, that you may need to consult your divine data greatness in your organization a.k.a Your DBA, to configure your SQL server, to enable FileStream,  this may make you DBA’s a little nervous from a security perspective, essentially it increases threat exposure to SQL server, an attacker may be able to corrupt your SQL server, but coming at it from FileSystem. ( a complete discussion of this threat etc, quite frankly is beyond the scope of this article and also my limited knowledge!) . So to avoid any fall outs with your DBA, I propose you evaluate whether you are able to create a seperate database from your application database, Specifically designed for creating a FileStorage.
A side note, I usually advocate this because, I for one don’t understand why anybody would want to burden application database, with storing huge blobs of data, it makes Backup and recovery of your application an arduous task, let alone inflating your database size!  It’s also bit like storing your auditing and applciation logging in your application database!  What happens when the DB goes down, how do you read your Audits to find out what went wrong?  It always amazes me that the Aerospace industry do this, Race on to find Malaysia Airlines black box as battery sending signal ‘will run out in 30 days’ , surely it makes sense that if this is such crucial information to help investigators find out what went wrong with the plane or even finding out where it is, it shouldn’t dissapear with the plane, surely with the technology available these days we can log the data remotely?  But I digress!
2.)  Entity Framework doesn’t support FileTable
This is a pretty good reason from a Lazy Developer perspective! If you’re like me and are somewhat lazy when it comes to code, and only really want to write whats absolutely necessary, and use tools to alleviate much of the grunt work as much as possible, you’ll discover to your horror that tools like Entity Framework Power Tools , will  stop working if you have FileTables incorporated into your database project! You’ll start getting errors like One or more errors occurred while loading schema information.
This is caused by hierarchyid data type used in File Table, which is not supported in Entity Framework.
 When you attempt to Reverse Engineer Code First using the power tools. This can become a major PITA on a large scale project, days consumed by writing boring POCO’s and Mapping logic. Enough already don’t do it!
3. ) Always Abstract out your File Storage
Architecturally speaking I always try abstract out file storage from the  application.  Primarily due to scalability and exstensibility. If you do so much plumbing code to store images and files withing the DB, what do you do when the client says, “Hey!, I hear all the cool kids are playing with CDN, can we do that too?” Migrating all that data out of your database, becomes a full scale war of data! because no doubt, regardless of how good your software teams intentions, to isolate concerns, bad habits will emerge, and there will be all sorts of primary key constraints, and data references that creep in!
Posted in ASP.net MVC, Big Data, C#, Database Development, Design Patterns, Software Development, Visual Studio Tagged with: , , , , ,

Useful SQL server Statements

Get Server Name

 

Get Username
 

Get Microsoft Version Number
 

 

Posted in Geek

Solwise HomePlug PLV-500AV-Piggy

I have recently completed renovating my garage, in which I have built a Home Office/Man Cave.  Well to tell the truth, I had nothing whatsoever to do with the actual building work, I left all that up to my father in law.  Lets just say that working with any sort of tool, other than the software kind, is not my forte, but that’s a whole different story. Needless to say I now have my very own piece of the house. Somewhere I can play work undisturbed by the rest of the family.

fitt geek dad

Man cave desk

 

Whilst moving into the new man zone, and setting up all my computer equipment. I realized that the WIFI signal from my broadband router just wasn’t strong enough to make it through to the garage, slight oversight on my part. However, after a few moments of panic, I cam up with a neat little solution.  I have already been making use of HomePlug networking technology a.k.a Powerline or Ehternet over power to extend our broadband to parts of the house that WiFi just couldn’t reach ( sounds a bit like a Heineken advert) , so I just grabbed one of the plugs and plugged it in the garage and  problem instantly solved.  However, I ran into another problem when I wanted to buy an additional plug for the garage, in that the plugs I was using , Solwise PL-85PE Twin MK2, are no longer available.

I shouldn’t of been that surprised I had purchased them over 4 years ago, and plugged them and connected them, and have been using them ever since. I have never had any trouble with them, and they have been providing fault free broadband access to the All in One computer and a Media server in the kids play room for the past few years. So essentially they have been a “Plug and Forget”.

I needed to upgrade my HomePlug network, not only were my choice of HomePlugs out of date, but also the standard they implemented had been superseded too. Essentially the plugs I had been using where still based on the HomePlug 1.0 standard, and most HomePlugs on the market these are all based on the HomePlug AV2 standard.

Solwise HomePlug AV 500Mbps Pass Through

It was primarily due to the “Plug and forget” experience I had with the last Solwise product, that I primarily decided to upgrade to the Solwise PLV-500AV-PIGGY   , I bought 3 plugs,  you need a minimum of two plugs to create a network, in order to also connect the TV in the kids playroom to the broadband so the kids can watch movies on Netflix & LoveFilm.

net-pl-500av-piggy-1

Ease of use

Setting up the HomePlug Network couldn’t be simpler. This is truly plug and play technology.  All that is required is a CAT 5 From your internet router, plug into the port on the HomePlug and then plug it into the socket.  After that is done, it’s basically go to the location you want the second HomePlug, plug it in, plug in the CAT5 cable then connect it to the device you want,  Voila!, connected to the network. Repeat for the third connection. Simple, no fuss, no mess & no cursing the gods of technology!

Speed

I have had no problems at all with the speeds.  I have not experienced any limitations or latency issues regarding the speed delivered by the HomePlugs.  I have been able to absolutely pound the network and do all sorts of streaming activities without any issues i.e. I have been able too let the kids watch movies on netflix on one PC, listening to streaming radio on another, while working on Terminal Server session connected to a server based in the States, while the wife browses the internet using the wireless adapter on her iPad and neither party experienced any issues at all.

 

 

 

Posted in Other Stuff, Product Reviews

Change Magento Admin Url Magento 1.7.x

This is a handy tip to help you protect your Magento backend against Hackers and brute-force attacks. I recommend you change the default URL to the Magento Admin Panel.  It is really quick to do and adds an additional layer of security to your site.

NOTE: DO NOT use the web interface in the Magento Admin Panel to the change the URL, this is known to cause problems.
Step 1 – Change Path
I usually login into the site and disable Cache Storage Management, then log out.
Log in via FTP to your site, go your Magento root installation.
Navigate to the app/etc folder  and open the local.xml in a text Editor
Find the following segment
  1. <admin>
  2.   <routers>
  3.     <adminhtml>
  4.       <args>
  5.         CDATA[admin]]></frontName>
  6.       </args>
  7.     </adminhtml>
  8.   </routers>
  9. </admin>

Replace admin with your new admin path. This should be something unique which should be a little hard to guess, only use letters.

i.e. gooseberry  or yada or some such path.
Save the File.
Step 2 – Refresh cache.
If you didn’t disable the cache int he previous step. You can use FTP client to delete the content of the var/cache/ directory, or use the following SSH command.
rm -rf var/cache/*
Step 3 – Complete
The change is now complete and you should try to log in via the new admin url – http://domainname/adminpath/, replacing ‘adminpath’ with the path you chose in the step above. If everything went fine, you should now be presented with the Admin Panel login screen at the new URL. The old admin login URL should return a 404 error message.

 

 

 

Posted in Geek, PHP, Programming, Web Development

Install Adobe Flash Player Ubuntu

This is just a quick 30 second tip on how to install Adobe Flash player on Unbuntu.

1. Open a terminal window. (Ctrl + Alt + T)

2. Type in the following command then hit Enter.

 

 

Posted in Geek, Ubuntu

My Development Workstation Set Up

This post has been inspired by a few posts that I have read in the Geek o’ sphere;

Thats right people, us geeks love what we do so much that we even compare our software development workstations and post about them on the internet!

I thought I would throw my current setup in to the mix. I have been working with a new set up for a couple of weeks, with which I am pretty stoked about this set up.

My work development setup

Microsoft Ergonomic 7000 Wireless Desktop

This is a really awesome keyboard and mouse set.  Specifically designed for us software development types (Ninja Code Monkeys), for those long days of hard coding in the cubicles.. i Love the larger keys and the ergonomic design and the oversized mouse, after initial couple of days of getting used to it, is really cool.  I have been using the Microsoft Ergonmic 4000 Keyboard and Microsoft Optical Trackball on my home setup for a few years, but decided to go wireless in the office.

Buy your Microsoft Ergonomic 7000 Wireless Desktop here >>>

IIyama ProLite E2773HS

When you’re staring at screens all day it is essential that you make it an enjoyable experience.  I like to have a lot of space to play with, on any average development day,  there is nothing unusual for me to have a few applications open all at one time, i.e . Visual Studio, Eclipse, Firefox, Opera, IE,  SQL Manager etc, one of my pet hates is minimizing windows then having to hunt for them again, so I like to tile my windows, so  a big monitor is essential, dual screens are a must! These iiyama monitors are the dogs danglies,  when it comes to resolution and space!

Buy your iiyama Prolite E2773HS here >>

HP EliteBook Intel i7-3250M CPU 2.90GHz 8.GB ram 64 bit – Windows 7

I am really impressed with this little laptop! It’s very responsive and handles all the tools I use really well. I love the design too, it feels really solid and rugged, just what you need as a work PC. The design looks impressive in client presentations too. I bit of a Mac Book clone, but who cares it looks great.

I upgraded the memory to 8GB, so I can have 3 screens running no problem, with no real performance degradation. This is something my Dell XPS 15z sucks big time at.

  • HP EliteBook 8470p
  • Core i7 3520M / 2.9 GHz
  •  Windows 7 Professional 64-bit
  • 8GB RAM
  • 500 GB HDD
  • DVD SuperMulti
  • 14″ HD+ anti-glare wide 1600 x 900
  • AMD Radeon HD 7570M
  • Bluetooth 4.0 EDR
  • platinum

Buy your HP EliteBook 8470p here >>

Drop a link to your workstation set up in the comments below, I’m always keen to see what others are using!

Posted in Geek, Hardware Tagged with:

Show active file in solution explorer

I am currently in the process of migrating all the blog content of this site over to my other site which is dedicated to all Information Technology , and is more focused on Software Development, Software Engineering and technology in general.

You will be able to find this post at the following URL

http://www.threenine.co.uk/blog/show-active-file-in-solution-explorer/

We will be repurposing FitGeekDad over the next few months and it will be undergoing some very exciting updates!

Posted in Programming, Visual Studio Tagged with: ,

Quick setup for Mobile Development on ASP.net MVC 4

This is a quick tip to enable you to set up your ASP.net MVC 4 project for mobile development really quickly.  If you’re read Delivering Mobile-Friendly WebSites with MVC4: A Developers Guide then you’ll appreciate this tip, as it actually a NUGET package created by the author to actually implement everything that he outlines in his book!   I have used this on several projects so far and love it!

This package will update your MVC4 project, installing jQuery.mobile for you and adding in adaptive view features for mobile devices, returning unique views to desktops, tablets, and phones. It will create a DisplayModeProviders class and the ViewSwitcher code for you and includes the necessary MVC4 Shared Layout files for those mobile pages. With a couple of quick edits, you’ll have adaptive mobile views running in your MVC4 site in minutes.

The Link to the Nuget Package is : http://nuget.org/packages/LCI.jQueryMobile.MVC4/

You can obviously install it using the command-line package manager

Or just right click your solution in and select “Manage Nuget Packages for the Solution …” and search for LCI.jQueryMobile.MVC4

After you have installed the package a text file will be visible in your editor with some additional steps to carry out.

This is all you’ll need to up and running in seconds!

Enjoy!

Posted in C#, Programming, Quick Tip Tagged with:

Install and Configure a LAMP Server on Ubuntu 12.04 Desktop

This post is just a quick guide that will enable you to setup a UBUNTU desktop as a LAMP server to enable you to do some PHP development.

Go to the terminal window and type in;

once that is complete type in

Select LAMP Server

Then once that is setup I always run the following command

This esnure that mysql is installed on the machine

Once Complete install phpmyadmin

This is should be it!

You can now test your machine, by going to http://localhost and http://localhost/phpmyadmin

Posted in Geek, PHP, Programming, Ubuntu

Follow me on Twitter