Archive for June, 2011

 

codeignitor IE session problem

Friday, June 3rd, 2011

was facing same problem of session with IE 8. Many threads suggested for underscore, timezone difference. Real problem is timezone difference. CI creates cookie with server time and IE checks expiry related to client timezone. And here issues comes. You can not change time zone of online server to match clients from all over world. The better solution is change cookie / session expiry time. By default it is two hours. Change it to 24 hours and problem will be solved.

In config.php file change value of following variable

from two hours

$config[‘sess_expiration’]      = 7200;

to 24 hours

$config[‘sess_expiration’]      = 3600 * 24;

codeigniter Class ‘MY_Controller’ not found

Wednesday, June 1st, 2011

If you are using codeigniter 2.0 and getting following error

Fatal error: Class ‘MY_Controller’ not found in application\controllers\welcome.php on line 4

then reasons can be

1. you are either not loading it properly (via an __autoload() or manually using include())

2. it is in the wrong place.

In CI 2.0 MY_Controller should be in application/core. In previous version it should be in application/library

Site map | Blog
Copyright © 2008, COG IT Solutions Pvt. Ltd. All Rights Reserved
XHTML Validated