How to change max execution time

Hi all, Can anybody help me how to change the Maximum execution time of this framework. I got this error when processing 4,312 records.

Here is my function:

public function synchronizeUsers() {

	$encrypter = new crypt;


	$encrypter->crypt_key(Yii::app()->params['crypt_key']);


	$emp = Yii::app()->db->createCommand("SELECT EMP_NO, EMP_LNAME, EMP_FNAME, EMP_MNAME, EMP_EMAIL FROM EMPLOYEE LEFT JOIN Users On EMPLOYEE.EMP_NO = Users.empno WHERE Users.empno is null");


	$dataReader=$emp->queryAll(); // execute a query SQL


	//print_r($dataReader);


	//$rows = $dataReader->read();


	$sql="INSERT INTO users (username,password, email,empno) VALUES(:username,:password,:email,:empno)";


	$command= Yii::app()->db->createCommand($sql);


	foreach($dataReader as $row ) {


	try {	


                    //username of the user for temporary fname+empno


		$username = $row['EMP_FNAME'].$row['EMP_NO'];


		$command->bindParam(":username",$username,PDO::PARAM_STR);


		//password is compose of lname+empno


		$password = $encrypter->encrypt(trim($row['EMP_LNAME']).$row['EMP_NO']);


		$command->bindParam(":password",$password,PDO::PARAM_STR);


		$command->bindParam(":email",$row['EMP_EMAIL'],PDO::PARAM_STR);


		$command->bindParam(":empno",$row['EMP_NO'],PDO::PARAM_STR);


		//$command->bindParam(":access",0,PDO::PARAM_INT);


		//$command->bindParam(":status","A",PDO::PARAM_STR);


		$command->execute();


	}


	catch(Exception $e) {


	


	}		


	}


	


}

I got a Fatal error: Maximum execution time of 60 seconds exceeded in D:\workspace\php\htdocs\yii\framework\db\CDbCommand.php on line 193

You need to change that in the php.ini:


max_execution_time = 30

In your php script:




set_time_limit(180); // Set max execution time 3 minutes.



Thanks guys.