Bookcafe

Thursday, October 11, 2012

Upgrading or Migrating From CakePHP 1 to CakePHP 2

It has been long time after my last posts on CakePHP and a lot of latest improvements have been carried out at the latest CakePHP 2. You could find the details regarding the migration especially involving the naming convention and you can read it here http://book.cakephp.org/2.0/en/appendices/2-0-migration-guide.html.To my findings, when doing the basic application using this latest version, do not move or alter the following files or otherwise you will get errors messages:

1. /app/model/AppModel.php
2. /app/controller/PagesController.php

Once you have successfully setting the new version, you will get the screen below:

If you had followed my previous posts on CakePHP version 1.3, in the latest version CakePHP, you must change the following:


1. syarikats_controller.php   to  syarikatscontroller.php

2. var $scaffold;   to   public $scaffold;



Tuesday, October 9, 2012

Takwim Sekolah 2013 by MOE (Ministry Of Education Malaysia)

Takwim Sekolah for 2013 is already published by the Ministry Of Education Malaysia at their official site. It might help you in planning your holidays in 2013. It is applicable for:

KUMPULAN A : Sekolah-sekolah di Negeri Kedah, Kelantan dan Terengganu

and

KUMPULAN B : Sekolah-sekolah di Negeri Perlis, Pulau Pinang, Perak, Selangor, Negeri Sembilan, Melaka, Johor, Pahang, Sabah, Sarawak, Wilayah Persekutuan Kuala Lumpur, Labuan and Putrajaya

It can be downloaded at this link Takwim Sekolah 2013 by MOE

Wednesday, June 6, 2012

HRMIS AND IIS 6


HRMIS is a very extensive based service system but still using old kind of technology i.e IIS 6.

Tuesday, May 29, 2012

e-Penyata Gaji & Laporan






Can be accessed using url:

https://epenyatagaji-laporan.anm.gov.my/Layouts/Login/Login.aspx

Limitations  :

1. Hackable thru SQL Injections

PORTAL RASMI HRMIS

Can be accessed using the following url:

http://hrmis.eghrmis.gov.my/
http://internet.eghrmis.gov.my/
http://hrmisone.eghrmis.gov.my/
http://hrmis2.eghrmis.gov.my/

Limitations :

1. Support ONLY IE
2. Use IIS 6

Wednesday, February 22, 2012

My First Application in Yii Part 2

Now, we go into serious matter in Yii, and I would like to create the simplest application as described in the Yii website tutorial. I going to use Yiic.php at the command prompt to create my first application named azmipelahtest in the C:\xampp\htdocs and shown as follows:



As shown above I just typing php yiic.php webapp c:\xampp\htdocs\azmipelahtest
Now I can access my fisrt Yii application using my IE browser at http://localhost/azmipelahtest


Monday, February 20, 2012

My First Application in Yii

Yii is a PHP Framework which works similarly to CakePHP. I manage to put some effort to read and train myself using the Yii framework. When you visit the Yii websire, you will find it is very interesting that to setup Yii just take about 3 steps.


Step 1 : Create Database 
Step 2 : Auto generated Base PHP Code uisng Yiic.php 
Step 3 : Customise the codes


 In my case I'm using xampp even though I found out that the lastest version of xampp 1.7.7 has issues in windows XP Sp3. I have tried to install xampp version 1.7.7 so many times and at the apache failes to start up. So I tried the previous version of xampp 1.7.4 and finally I manage to start the apache web server and build my first Yii application.


I installing my XP Sp3 in Windows Virtual PC on top of my Windows 7 Pro. Files transfer between the host and the guest sometimes makes corrupted files. I need to use the Md5 string to make sure the my transferred files are not corrupted.


Actually at first, I'm having problem in setting up the phpmyadmin root password. I need to use the following to set the root password (PLEASE REMEMBER DO THIS FIRST BEFORE DOING ANYTHING ELSE).


C:/xampp/mysql/bin> mysqladmin -u root password NEWPASSWORD
** The above commands will set your root to have password.

However, if you want to change (or update) a root password, then you need to use the following command:
C:/xampp/mysql/bin> mysqladmin -u root -p'oldpassword' password newpassFor example, If the old password is azmi, you can set the new password to azmiabc, enter:
C:/xampp/mysql/bin> mysqladmin -u root -p'azmi' password 'azmiabc'
AND PLEASE SET YOUR CONFIC.INC.PHP to the following configuration


/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost'; 
$cfg['Servers'][$i]['connect_type'] = 'tcp'; 
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['user'] = 'root'; 
$cfg['Servers'][$i]['password'] = ''; 
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = false;


DO NOT TRY TO CHANGE YOUR ROOT PASSWORD FROM THE PHPMYADMIN USER INTERFACE SINCE THE PASSWORD SHOULD BE ENCRYTED AND CANNOT BE TYPED DIRECTLY IN THE PASSWORD FIELD UNDER THE MYSQL->USER TABLE.


I have to make sure that PHP is native to the windows environment to make sure that any PHP files can be run under DOS command prompt so I do the following under Computer ->Advance System Settings



The go to Advanced tab, select Environment Variables..



Select TMP then Path and select Edit ... as shown above


Key in in the Variable value ;c:\xampp\php then click OK and restart your PC. Then test your setting by going to the command prompt and key in php -v the result should (at least) like the following: