Category Archives: Yii

Getting 404 – “Unable to resolve the request” on Production Server on Yii Application

Ok I got this error when I deployed my Yii application to production server

404 - ERROR
Unable to resolve the request

All my controllers were present, and the url manager was enabled. After some running around I found the issue.

My development environment is Windows and on that urls with lower case letters worked without an issue. But the production environment is on Linux so the url is being case sensitive when its loading the controllers.

Change Urls from

/index.php/controllername/action

to

/index.php/ControllerName/action

Yii Framework.. my implementation

I used Yii framework successfully to create a raid management system for Sri Lanka Consumer Affairs authority. I have hosted a demo version at this site so that you might check it out. Let me know what you think.

http://iraid.host.org

username – admin

password – 123456

Currently I’m trying to create a hotel reservation system for a travel agent using yii. lets see how it goes. 🙂

How to hide the delete button on CGridView in Yii

Just a simple thing but hard to find on the Yii documentation.

just add the following code in the delete button definition section in CGridView implementation,

array(
‘class’=>’CButtonColumn’,
‘buttons’=>array(
‘update’ => array
(
‘url’=>’Yii::app()->createUrl(“accusee/update”, array(“id”=>$data->id))’,
),
‘view’ => array
(
‘url’=>’Yii::app()->createUrl(“accusee/view”, array(“id”=>$data->id))’,
),
‘delete’ => array
(
‘url’=>’Yii::app()->createUrl(“accusee/delete”, array(“id”=>$data->id))’,
 ‘visible’=>’false’,
),
),
),

iRaid and Yii Framework

What is iRaid?

iRaid is a project that I’m doing at e-services Lanka. Its a system that is being developed for Sri Lanka Consumer Affairs Authority to manage their Raiding operations.

As this system is web based any information that is being updated to the system by district offices are immediately available to the head office.

This helps to streamline their operations and also to track and update all raid related information efficiently and productively. By implementation of this system the paper trail used by the current manual system can be cut upto 80%.

The Technology behind iRaid.

Yii Framework – mainly the system was developed by me using the Yii framework. I was trying to develop using cakephp but found that Yii framework is much more easier to learn and develop. I managed to learn the basics of the framework and complete upto about 90% of the system in less than a month. (Project was scheduled for 3 months). And also the numerous extensions available for Yii is also helping to minimize the development headaches that are normally there.

with its inbuilt CRUD operations and caching mechanisms development and implementation speed has increased.

Yii is fully based on MVC architecture and by using Gii tool provided we can easily create Models, Controllers and Views.

PHP5 – the coding is fully object oriented and used PHP5.

MySQL – MySql was used to create the database and has been really easy to do changes and implement in multiple server environments.

Some Screen shots of the system.

Let me know if you want to know about how to use Yii Framework in your projects. Its easy to learn and fun to code. 🙂