Windows 7/8/10 Install Error (0x80300024)

When installing windows on a multidrive/boot system you can sometimes get this rather cryptic error message. It relates to how Windows setup sees your Drive partitions. There are two was to solve it;

1) Disconnect all drives from your PC except the one you are installing Windows on.
2) Enter your BIOS and set the hard drive you are installing Windows on to be the top-priority drive.

Either of those should fix the error message.

Cakephp Tips – Sort Data With the Pagnator Component

If you wanted to sort a Model by a certain field in this case take the field “created” which is a date. We can simply tell cakePHP to pagnate entries by the order they were created by the following example.

	public function index() {
		// we prepare our query, the cakephp way!
		$this->paginate = array(
			'limit' => 20,
			'order' => array('created' => 'desc')
		$this->Link->recursive = 0;		
		$this->set('links', $this->Paginator->paginate());

More Examples can be found here;

Cakephp 2.0 Tip# 14 File Uploads


Firstly you need to install the Plugin;

In the Model of the object you want to allow uploads to(eg User,Product) add;


public $actsAs = array(
        'Upload.Upload' => array(


In the View Form of this action add;

<div class="users form">

<?php echo $this->Form->create('User', array('type' => 'file')); ?>
		<legend><?php echo __('Add User'); ?></legend>
		echo $this->Form->input('picture',array('type' => 'file','accept'=>'image/*'));			
<?php echo $this->Form->end(__('Submit')); ?>

CakePhp 2 Tip #11- Force SSL Connection


In your app Controller add;

class AppController extends AppController {

    public $components = array('Security');

    public function beforeFilter() {
        if (isset($this->params['admin'])) {
            $this->Security->blackHoleCallback = 'forceSSL';

    public function forceSSL() {
        return $this->redirect('https://' . env('SERVER_NAME') . $this->here);

More info: