Monday 31 December 2018

PHP - how to increase memory limit for scripts [ANSWERED]

Quick one - assuming you are looking to increase the memory of a php script, there are many ways, but the most effective in script option is to use the following command.


 ini_set('memory_limit','512M');
or

 ini_set('memory_limit','1G');



Which hopefully are self explanatory. After all, '1GB' is 'one GigaByte' and 'M' is MegaByte. Or in more modern parlance, 134217728 Bytes is 128 MebiByte.

Setting the php memory limit by putting the above line in your php code will allocate extra memory if needed up to the specified size. I usually increase the value until the message goes away.


The error message is usually 

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 54 bytes)

This is 128 Mebibyte - the default limit in PHP

There are many other resources on the web which suggest setting the value to -1 but this means that your server will allocate an unlimited amount of memory. Never good to do this because if you script is using up all the resources, other processes might get frozen or locked out. If your script is running on a web server, this may give the impression that your website is down.

So, adjust in small increments.



Thursday 7 June 2018

[Answered] Where can I buy MonaVie Active in the UK

Following on from recent requests I wanted to share the latest information about MonaVie and international shipping, including London UK.

My post on ebay still stands and is reproduced here for your benefit.

MonaVie Active - 1 of 2 varieties available in the UK
MonaVie Active - 1 of 2 varieties available in the UK

How to buy in the UK

Monavie comes in 2 types

1. original (purple bottle - no longer available)
2. active (pictured)
3. reserve (gel pack, pictured below)

This guide lets you know which one is best for you and where to get it.

MonaVie Original (Essential) - blend of 19 fruits including acai

From external site:
MonaVie Essential® is an efficacious MonaVie juice that defends against the effects of aging while improving your overall health. Nourish your body with powerful antioxidants and nutrients.

Original / Essential is a purple bottle - contact master distributor Mark Hopgood -  text 07767875550 for details on a supplier near you. Only Monavie Active is being produced now.

MonaVie Active ( Green Bottle ) + plant derived glucosamine

From external site:
MonaVie Active® is a delicious fusion of 19 body-beneficial fruits and scientifically validated glucosamine. This delicious MonaVie juice targets joint mobility and flexibility while also promoting overall health and wellness.*

Active is a green bottle - contact master distributor Mark Hopgood -  text 07767875550 for details on a supplier near you. UK delivery is typically 3-5 days.

Reserve

A unique blend of superfruits containing botanical antioxidants that work together to provide the support your body craves.
Sweetened by nature, RESERVE™ delicious, sweet berry taste contains no added sugars, no artificial flavors, colors or sweeteners.

RESERVE is a handy pouch packed with fruits - contact master distributor Mark Hopgood -  text 07767875550 for details on a supplier near you.

Reserve Gel Pouch

Açai Berry, Dark Sweet Cherry, Blueberry, Concord Grape and Pomegranate. These power players owe their distinct red, blue, and purple hues to their high anthocyanin content.

Text Mark Hopgood on 07767875550 for details on a supplier near you.

Wednesday 25 April 2018

[ANSWERED] How to edit the hosts file in Windows (10)

If you are looking to edit your hosts file, here's how.

You will need to run notepad in elevated mode ( administrator access ) because the hosts file is an important system file and protected.

Here's how.

1. in the search bar type notepad and right click run as administrator

running notepad as an administrator (elevated priviledges)
2. click yes, then notepad opens in elevated mode

3. Locate the hosts file

File Open from Notepad and paste the following into the file name box
c:\Windows\System32\Drivers\etc\hosts
then click open

4. Edit and save the hosts file


the hosts file ready for editing and saving