简体   繁体   中英

on server login page or registration page occur problem in codeigniter

Some important problems face in Codeigniter which I found and at last found the solution maybe it helps you so I share it. - Sometimes in CodeIgniter face a problem of login page redirection to the login page again. - On registration form when you fill the form and submit then it shows a null problem which error: 3014 or some type of error. - Mostly the session not working.

What is the solution

  • there is lost of type solution and it depends on different scenarios.
  • sometimes at $this->session->set_userdata('logged_in', $session_data); at this point don't give underscore on logged_in will help.
  • some times on application->config->config.php at $config['sess_cookie_name'] = 'ci_session'; removeing the underscore from ci_session will help.
  • And many other way to find your best solution. And right now after facing a problem with my scenario and stucked for around 4 hours and searching lot's of pages and CodeIgniter form but didn't get any solution and then I realise maybe it's a version problem, mine was 3.1.3, so I updated it to 3.1.9. but the problem which I explain above which as same then after few more minute on spend on google but the problem was the same. Then suddenly one thing clicks on my mind and I applied that and boom all those problems solved.

This is the solution which I applied on my case and it worked perfectly. I memorise one thing. on .htaccess I route my non www site to www.example.com but on

config.php my base_url was example.com

and that is the problem wich occurs all those above problems on my website but when I change my

example.com to www.example.com on base_url

everything comes on normal. Maybe it also helps you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM