CodeIgniter Forums
ion_auth total problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7)
+--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13)
+--- Thread: ion_auth total problem (/showthread.php?tid=67077)



ion_auth total problem - DimCI - 01-12-2017

Hi all!

I use CI+Ion_Auth on a couple of sites already. Now I've been created a new one using CI 3 for the first time and the latest Ion_auth

I always create a site on my local PC and server first (LAMP, Linux Mint), then change the necessary vars and upload to host via ftp.

The problem I've seen now is "simple" - auth does not work AT ALL on web host server. You fill in the login form, press button, then the page reloads, login and pwd fields emptied, and that's all.  No error messages in CI logs, server logs (ENVIRONMENT set as 'development').

All other controllers, models, helpers and views work as they have to work. No problems at all on localhost. Ion_Auth works fine here too, of course.

My localhost  PHP version is 7.0.13. Old sites on host account still use 5.3 and 5.2 with older CI 2x and Ion. The new site works fine on PHP 5.6 (recommended by hoster). CI is 313.

I'd prefer to have a few errors, than this absolutely silent sabotage one Wink

Did anybody have such? This could be a simplest mistake, I admit, but I've do the same operations on another site without any complications. All is fine there. Or this could be some PHP.ini parameter with the current v. does not work?

Need an idea what/where to search Wink

Thank you.


RE: ion_auth total problem - enlivenapp - 01-12-2017

Are you echoing $message in your view file for errors?


RE: ion_auth total problem - DimCI - 01-13-2017

I've just found the cause myself.

I have a redirect to www.site.com for site.com requests in htaccess file. $config["base_url"] was set to 'site.com'. Do not know why but the forms with action="http://site.com/..." do not work because $_POST has been emptied. On my other CI driven sites all config[base_url] vars are empty. The changing base_url by addition 'www.' was the remedy.

Uffff! Wink


RE: ion_auth total problem - qury - 01-13-2017

Your problem sounds similar to something i have seen in the past. My issue was resolved then by:
- ensuring that the sessions were correctly initialized and configured in config.php
- check the cookie configuration in config.php especially the domain config piece

It might not solve your issue though Wink