Form Validation Always False (Registered Domain Name Issue) |
Hi guys,
I have an issue with my Codeigniter website whenever I change the base_url to my registered domain name. When I use the elastic IP address of my AWS EC2 instance (Windows 2012 R2 AMI), everything works fine - even when I access the website externally via elastic IP, the form validation works. However, when I switch the base_url to my registered domain name, whenever I try to log-in, the form validation always returns false. I'm pasting the code here for your reference. FYI, I've enabled CSRF protection and Session cookies. controller-login.php Code: public function login(){ Authenticate_model.php Code: public function login_user($username,$password) { Thank you guys so much for your help in advance.
You not say how you make sure if user is logged in, so just saying what normally my issue with this.
Could be that your session is not getting set on when specifying domain name, just make sure your cookie settings in config file is on defaults and if you use files as driver that apache/web_user have access to write the files. That normally my issue with login problems. L:
(07-06-2017, 11:26 PM)karman Wrote: You not say how you make sure if user is logged in, so just saying what normally my issue with this. Do you mean setting the cookie_domain values? How do you configure your apache files?
Hi, sorry, notifications not setup so only see your question now.
Just make sure your cookie values are the defaults. If you use file based session, make sure apache user has RW on the folder where they get saved. For debugging: I normally set the "logged in " session variable and then reading it immediatly after. If its not getting set then you know its config issue somewhere. if getting set, then maybe code logic. |
Welcome Guest, Not a member yet? Register Sign In |