leap-it / Flexi-Auth-and-Codeigniter-3RC2

Starter kit codeinginer 3rc2 with flexiauth
MIT License
3 stars 3 forks source link

You must login to access this area. #1

Open charlesmudy opened 9 years ago

charlesmudy commented 9 years ago

Hi,

I have used flexi auth and CI on many application but not the latest CI3, and I usually on set $instant_activate = TRUE; and logs the user in. But for some reason, I can't get in ... I get the error above. Any suggestion?

leap-it commented 9 years ago

Could you explain in detail what you have done: are you using a copy of this download or trying to integrate it in an existing site ?

charlesmudy commented 9 years ago

Well now I took a fresh installation, followed your README.md instructions and trying to log in and this is what I get:

A PHP Error was encountered

Severity: Notice

Message: Array to string conversion

Filename: core/Input.php

Line Number: 389

Backtrace:

File: /Applications/MAMP/htdocs/craigslist/application/models/Flexi_auth_model.php
Line: 2335
Function: set_cookie

File: /Applications/MAMP/htdocs/craigslist/application/models/Flexi_auth_model.php
Line: 1746
Function: regenerate_ci_session_id

File: /Applications/MAMP/htdocs/craigslist/application/models/Flexi_auth_model.php
Line: 1599
Function: set_login_sessions

File: /Applications/MAMP/htdocs/craigslist/application/libraries/Flexi_auth.php
Line: 61
Function: login

File: /Applications/MAMP/htdocs/craigslist/application/models/Demo_auth_model.php
Line: 152
Function: login

File: /Applications/MAMP/htdocs/craigslist/application/controllers/Auth.php
Line: 180
Function: register_account

File: /Applications/MAMP/htdocs/craigslist/index.php
Line: 292
Function: require_once
charlesmudy commented 9 years ago

Maybe this is the issue Update the 'sess_use_database'? ... I have it here:

$config['sess_use_database'] = TRUE;
$config['sess_driver'] = 'database';
$config['sess_save_path'] = 'ci_sessions';
$config['sess_expiration'] = 7200;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
leap-it commented 9 years ago

I suggest you read the CI3 documentation $config['sess_use_database'] = TRUE; is not used anymore

charlesmudy commented 9 years ago

But what does this mean?

This step must be completed to all flexi auth installations. Update the 'sess_use_database' config setting to TRUE. This instructs CodeIgniter to save session data to the database rather than as a browser cookie. This is required as the auth session data is too big to store in a cookie.?

Even without it ... still doesn't work. Maybe you can put it somewhere and let me test the login?

leap-it commented 9 years ago

not in CI3 in anymore read the ci doc mate

'sess_driver' The storage driver to use: files, database, redis, memcached
'sess_cookie_name'
The session cookie name, must contain only [0-9a-z_-] characters
'sess_expiration'
The number of SECONDS you want the session to last.
Setting to 0 (zero) means expire when the browser is closed.
'sess_save_path'
The location to save sessions to, driver dependant.
For the 'files' driver, it's a path to a writable directory.
For the 'database' driver, it's a table name.
Please read up the manual for the format with other session drivers.
IMPORTANT: You are REQUIRED to set a valid save path!
'sess_match_ip'
Whether to match the user's IP address when reading the session data.
'sess_time_to_update'
How many seconds between CI regenerating the session ID.
Other session cookie settings are shared with the rest of the application,
except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.

*/ $config['sess_driver'] = 'database'; $config['sess_save_path'] = 'ci_sessions'; $config['sess_expiration'] = 7200; $config['sess_match_ip'] = FALSE; $config['sess_time_to_update'] = 300;

thats my session info and working just downlowed my files and did fresh install on another server all is working

charlesmudy commented 9 years ago

Yes I saw yours works and re-downloaded a new copy just now and installed the sql you had there, changed config url, url inside controllers, database setting, .htaccess folder. I have done the other security setups like encryption_key since there optional.

I would expect this basic setup to work but still the same error. I'm sorry for disturbing you on this.

kawright129 commented 8 years ago

I get the Array to string conversion notice too and can confirm CI3 setting are correct

charlesmudy commented 8 years ago

I can't 100% remember my solution but I think one of my changes has to do with PHP version

kawright129 commented 8 years ago

What version are you using? I get the same notice on both 5.4 and 5.5.

charlesmudy commented 8 years ago

I have 5.6, sorry but I can't really remember the fix :(

hannannexus commented 8 years ago

It's Working.....

leap-it commented 8 years ago

great i will update to Ci 3.03 soon

hannannexus commented 8 years ago

Good Job Actually...

hannannexus commented 8 years ago

Thank's a lot.......

leap-it commented 8 years ago

you can get latest version from here http://www.leap-it.be/flexiauth

cfehnel commented 8 years ago

Is this still available? I am going to the above link, but requested URL is not found.

leap-it commented 8 years ago

Yes ill fix the link. I have changed server latly.

leap-it commented 8 years ago

Try https://www.leap-it.be/dev/flexiauth/

Let me know if all goes well

dralain commented 7 years ago

Hello, I have exactly the same problem for the login flexiauth. This works with version 5.5 php but not with version 5.6. Do you find the problem after this discussion? Any suggestion? Thank you.

dralain commented 7 years ago

You have already answered this question. You have indicated a link to download the patch. But it does not work.

sdfarshid commented 6 years ago

hi

I have same problem with flexi_auth and CI 3 and PHP 7

this is my conifg

$config['sess_driver'] = 'database'; $config['sess_save_path'] = 'ci_sessions'; $config['sess_expiration'] = 7200; $config['sess_match_ip'] = FALSE; $config['sess_time_to_update'] = 300;

and this is my error

A PHP Error was encountered

Severity: Notice

Message: Array to string conversion

Filename: core/Input.php

Line Number: 408

Backtrace:

File: /datas/faslebardasht/public_html/application/models/Flexi_auth_model.php Line: 2335 Function: set_cookie

File: /datas/faslebardasht/public_html/application/models/Flexi_auth_model.php Line: 1746 Function: regenerate_ci_session_id

File: /datas/faslebardasht/public_html/application/models/Flexi_auth_model.php Line: 1599 Function: set_login_sessions

how can i fix it ?

Reconix commented 6 years ago

You could give this a try. Note: is the full demo

https://github.com/Reconix/Flexi-Auth-CI3