Welcome Guest, Not a member yet? Register   Sign In
Switched to PHP5 and CI Broke, Please help!
#11

[eluser]Phani K[/eluser]
Hi

When i follow the given link i.e http://github.com/benedmunds/CodeIgniter-Ion-Auth

i am able to see the login page in my application.
when i give the login credentials as specified in the readme file and submit.
it is redirecting to the page "http://localhost/ci172/index.php/auth/index.php/auth/login"

what i need to fix in my code?

Note:
1) I didnt added any new controllers yet.
2) My codebase is in /opt/lampp/htdocs/ folder
3) My codebase structure...

phanik@phanik-desktop:/opt/lampp/htdocs/ci172$ ls
application index.php nbproject system user_guide
#12

[eluser]WanWizard[/eluser]
It looks like it doesn't create the session cookie, and therefore doesn't see you as logged in.

Did you set the database up properly (with the required tables)? How is your session setup? Did you configure the session properly (config/config.php)?

Note that 'localhost' for some browsers is an illegal hostname for a cookie, create a dummy hostname (citest.phanik.local) in your /etc/hosts file, have it point to 127.0.0.1, and use that in your apache config. Also, make sure the cookie path is properly setup in the config.
#13

[eluser]Phani K[/eluser]
Below is my config.php content


<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
*/
$config['base_url'] = "";

/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
*/
$config['index_page'] = "index.php";

/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
| 'AUTO' Default - auto detects
| 'PATH_INFO' Uses the PATH_INFO
| 'QUERY_STRING' Uses the QUERY_STRING
| 'REQUEST_URI' Uses the REQUEST_URI
| 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO
|
*/
$config['uri_protocol'] = "AUTO";

/*
|--------------------------------------------------------------------------
| URL suffix
|--------------------------------------------------------------------------
*/

$config['url_suffix'] = "";

/*
|--------------------------------------------------------------------------
| Default Language
|--------------------------------------------------------------------------
|
*/
$config['language'] = "english";

/*
|--------------------------------------------------------------------------
| Default Character Set
|--------------------------------------------------------------------------
|
*/
$config['charset'] = "UTF-8";

/*
|--------------------------------------------------------------------------
| Enable/Disable System Hooks
|--------------------------------------------------------------------------
*/
$config['enable_hooks'] = FALSE;


/*
|--------------------------------------------------------------------------
| Class Extension Prefix
|--------------------------------------------------------------------------
|
| This item allows you to set the filename/classname prefix when extending
| native libraries. For more information please see the user guide:
|
| http://ellislab.com/codeigniter/user-gui...asses.html
| http://ellislab.com/codeigniter/user-gui...aries.html
|
*/
$config['subclass_prefix'] = 'MY_';


/*
|--------------------------------------------------------------------------
| Allowed URL Characters
|--------------------------------------------------------------------------
|
*/
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';


/*
|--------------------------------------------------------------------------
| Enable Query Strings
|--------------------------------------------------------------------------
|
*/
$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd'; // experimental not currently in use

/*
|--------------------------------------------------------------------------
| Error Logging Threshold
|--------------------------------------------------------------------------
|
*/
$config['log_threshold'] = 0;
#14

[eluser]WanWizard[/eluser]
There's a lot missing from that.

Don't use localhost, but a proper host name. Remove any underscores from the cookie name (default is ci_session, rename it). Configure the sess_* variables in your config file so that you use database sessions (check the user guide and the ion auth instructions). Make sure the cookie_* config values are configured properly. the hostname should match the hostname of your site, the path should be "/", unless you installed CI in a subdirectory.
#15

[eluser]Phani K[/eluser]
Thanks for your support Wan...

I need the user registration outside... here the admin is able to create teh user.

How can i go ahead, am i have to create the register pages and other controllers for the same.
#16

[eluser]WanWizard[/eluser]
Sorry, I haven't got a clue what you're asking, and what the relation to your previous question is...
#17

[eluser]Phani K[/eluser]
I successfully login as admin, my question is. after login as admin only i am able to create the users. can i do it before itself... like register link in login page.




Theme © iAndrew 2016 - Forum software by © MyBB