Sunday, August 18, 2013

JavaScript - Regex to format currency

A simple way to format currency! Given a number, format it to a currency-esque format.

number.toFixed(decimalPlaces).replace(/(\d)(?=(\d{3})+\.)/g, "$1,");


Symbol (EG: R, $):
Number (EG: 1234567.50):
Decimal Places (EG: 1, 2, 3 - Probably 2):

Saturday, August 3, 2013

Handler "PHP53_via_FastCGI" has a bad module "FastCgiModule" in its module list

I found this error after installing PHP on IIS, and attempting to browse to a local .php page.

Do the following to fix it.

1.) Go to Add / Remove Programs
2.) Click "Turn Windows features on or off"
3.a.) Open "Internet Information Services"

3.b.) Open "World Wide Web Services"
3.c.) Open "Application Development Features"
3.d.) Tick "CGI"
3.e.) Click "OK
3.f) Wait for it to complete.

4.) Attempt to go to your php page again.