CodeIgniter sessions and PHP native session both works fine.
But not together.
Mixing CI sessions and native session in CodeIgniter always causing troubles.
Script outside CI cannot access CI Session, no even $_SESSION native session created inside CI script.
The real problem is KCFinder use $_SESSION to control various things (Include access control).
But it can’t access anything created by CI scripts.
So I can either make KCFinder read CI session or let CI use native session.
Continue reading “CodeIgniter 3.0 KCFinder Integration Script”
/usr/local/bin/php instead of
Or otherwise PHP will only run index.php without arguments, which produces empty result.
CPanel is bugging me always.
Recently I ran into problems in all CodeIgniter projects using session library.
session_id is being reset randomly and all session data are lost.
After an hour of tracing I finally found the “bug”:
- FirePHP modified the User Agent string when FireBug enabled
- CodeIgniter destroy the current session due to invalid User Agent
- New session started, old session data lost
To fix the problem just disable
$config['sess_match_useragent'] in config.php,
or disable “Modify User-Agent Header” in FirePHP option (recommended).
P.S. I used to think it’s related to an old CodeIgniter AJAX bug and
$config['sess_time_to_update'], but finally found they are totally irrelevant.