Wednesday, 31 October 2012

Windows 2008 IIS Server PHP Error: Missing the temporary folder to store the uploaded file


  1. Check upload_tmp_dir at php.ini
  2. Find all instances of upload_tmp_dir make sure its only one
  3. Create your own temp folder set it to the folder you created
  4. upload_tmp_dir="C:\inetpub\tmp"

Tuesday, 30 October 2012

Yii Model Match Validator


           array('keyword', 'match',
                'pattern' => '/^[a-zA-Z ]*$/',
                'message' => '{attribute} has invalid characters. Only letters are allowed.'
            )

Thursday, 25 October 2012

Yii register jQuery


<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>

Yii include JS and CSS


<?php

Yii::app()->clientScript->registerScriptFile(
        Yii::app()->baseUrl . '/js/slider/jquery.flexslider-min.js', CClientScript::POS_END
);

Yii::app()->clientScript->registerCssFile(
        Yii::app()->baseUrl . '/js/slider/flexslider.css', CClientScript::POS_HEAD
);

?>

How to configure PHP, MySQL on IIS Windows server 2008 r2


  1. Configure IIS: Enable FastCGI on Role Services
  2. Download windows php installer: http://windows.php.net/downloads/releases/php-5.3.18-nts-Win32-VC9-x86.msi
  3. On installation of PHP choose IIS with fastCGI
  4. Download MySql Windows installer: http://www.mysql.com/why-mysql/windows/