2013-09-03 1 views
1

좋아요. 그래서 첫 번째 codeigniter 프로젝트를 성공적으로 만들고 CMS 인증을 위해 탱크 인증을 사용했습니다. MAMP 설치시 모두 정상적으로 작동하며 호스트에 업로드하면 작동합니다.탱크 인증은 업로드 후 등록 또는 로그인 할 수 없습니다.

나는 새 프로젝트를 내 mamp 설치에 복제하고 몇 가지 구성 설정 (새 데이터베이스, 기본 URL 등)을 변경했다.이 새로운 프로젝트가 서버에 업로드되면 CMS에 로그인 할 수 없다. .

양식이 전송되는 것처럼 보이지만 로그인 페이지가 다시로드됩니다. 유효하지 않은 사용자 이름/비밀번호에 오류가 없습니다.

등록 양식을 사용해도 동일한 문제가 발생하면 제출하고 아무런 오류없이 페이지가 새로 고쳐지고 사용자가 생성되지 않습니다.

어떤 시도를해야할지에 대한 아이디어는 정말 실망 스럽습니다. 탱크 인증 라이브러리가 오류가 없으므로 작동하지 않는 것처럼 거의 같습니다.

config-> tank_auth.php

<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); 

/* 
|-------------------------------------------------------------------------- 
| Website details 
| 
| These details are used in emails sent by authentication library. 
|-------------------------------------------------------------------------- 
*/ 
$config['website_name'] = 'Project 2'; 
$config['webmaster_email'] = '[email protected]'; 

/* 
|-------------------------------------------------------------------------- 
| Security settings 
| 
| The library uses PasswordHash library for operating with hashed passwords. 
| 'phpass_hash_portable' = Can passwords be dumped and exported to another server. If set to FALSE then you won't be able to use this database on another server. 
| 'phpass_hash_strength' = Password hash strength. 
|-------------------------------------------------------------------------- 
*/ 
$config['phpass_hash_portable'] = FALSE; 
$config['phpass_hash_strength'] = 8; 

/* 
|-------------------------------------------------------------------------- 
| Registration settings 
| 
| 'allow_registration' = Registration is enabled or not 
| 'captcha_registration' = Registration uses CAPTCHA 
| 'email_activation' = Requires user to activate their account using email after registration. 
| 'email_activation_expire' = Time before users who don't activate their account getting deleted from database. Default is 48 hours (60*60*24*2). 
| 'email_account_details' = Email with account details is sent after registration (only when 'email_activation' is FALSE). 
| 'use_username' = Username is required or not. 
| 
| 'username_min_length' = Min length of user's username. 
| 'username_max_length' = Max length of user's username. 
| 'password_min_length' = Min length of user's password. 
| 'password_max_length' = Max length of user's password. 
|-------------------------------------------------------------------------- 
*/ 
$config['allow_registration'] = TRUE; 
$config['captcha_registration'] = FALSE; 
$config['email_activation'] = FALSE; 
$config['email_activation_expire'] = 60*60*24*2; 
$config['email_account_details'] = TRUE; 
$config['use_username'] = TRUE; 

$config['username_min_length'] = 4; 
$config['username_max_length'] = 20; 
$config['password_min_length'] = 4; 
$config['password_max_length'] = 20; 

/* 
|-------------------------------------------------------------------------- 
| Login settings 
| 
| 'login_by_username' = Username can be used to login. 
| 'login_by_email' = Email can be used to login. 
| You have to set at least one of 2 settings above to TRUE. 
| 'login_by_username' makes sense only when 'use_username' is TRUE. 
| 
| 'login_record_ip' = Save in database user IP address on user login. 
| 'login_record_time' = Save in database current time on user login. 
| 
| 'login_count_attempts' = Count failed login attempts. 
| 'login_max_attempts' = Number of failed login attempts before CAPTCHA will be shown. 
| 'login_attempt_expire' = Time to live for every attempt to login. Default is 24 hours (60*60*24). 
|-------------------------------------------------------------------------- 
*/ 
$config['login_by_username'] = TRUE; 
$config['login_by_email'] = TRUE; 
$config['login_record_ip'] = TRUE; 
$config['login_record_time'] = TRUE; 
$config['login_count_attempts'] = FALSE; 
$config['login_max_attempts'] = 5; 
$config['login_attempt_expire'] = 60*60*24; 

/* 
|-------------------------------------------------------------------------- 
| Auto login settings 
| 
| 'autologin_cookie_name' = Auto login cookie name. 
| 'autologin_cookie_life' = Auto login cookie life before expired. Default is 2 months (60*60*24*31*2). 
|-------------------------------------------------------------------------- 
*/ 
$config['autologin_cookie_name'] = 'autologin'; 
$config['autologin_cookie_life'] = 60*60*24*31*2; 

/* 
|-------------------------------------------------------------------------- 
| Forgot password settings 
| 
| 'forgot_password_expire' = Time before forgot password key become invalid. Default is 15 minutes (60*15). 
|-------------------------------------------------------------------------- 
*/ 
$config['forgot_password_expire'] = 60*15; 

/* 
|-------------------------------------------------------------------------- 
| Captcha 
| 
| You can set captcha that created by Auth library in here. 
| 'captcha_path' = Directory where the catpcha will be created. 
| 'captcha_fonts_path' = Font in this directory will be used when creating captcha. 
| 'captcha_font_size' = Font size when writing text to captcha. Leave blank for random font size. 
| 'captcha_grid' = Show grid in created captcha. 
| 'captcha_expire' = Life time of created captcha before expired, default is 3 minutes (180 seconds). 
| 'captcha_case_sensitive' = Captcha case sensitive or not. 
|-------------------------------------------------------------------------- 
*/ 
$config['captcha_path'] = 'captcha/'; 
$config['captcha_fonts_path'] = 'captcha/fonts/5.ttf'; 
$config['captcha_width'] = 200; 
$config['captcha_height'] = 50; 
$config['captcha_font_size'] = 14; 
$config['captcha_grid'] = FALSE; 
$config['captcha_expire'] = 180; 
$config['captcha_case_sensitive'] = TRUE; 

/* 
|-------------------------------------------------------------------------- 
| reCAPTCHA 
| 
| 'use_recaptcha' = Use reCAPTCHA instead of common captcha 
| You can get reCAPTCHA keys by registering at http://recaptcha.net 
|-------------------------------------------------------------------------- 
*/ 
$config['use_recaptcha'] = FALSE; 
$config['recaptcha_public_key'] = ''; 
$config['recaptcha_private_key'] = ''; 

/* 
|-------------------------------------------------------------------------- 
| Database settings 
| 
| 'db_table_prefix' = Table prefix that will be prepended to every table name used by the library 
| (except 'ci_sessions' table). 
|-------------------------------------------------------------------------- 
*/ 
$config['db_table_prefix'] = ''; 


/* End of file tank_auth.php */ 
/* Location: ./application/config/tank_auth.php */ 

UPDATE : -

내가 다른 도메인 이름을 아직 동일한 서버에 업로드하고 잘 작동합니다. 이것은 분명히 코딩 문제는 아니지만 누군가가 빛을 비추거나 제안을하면 크게 환영받을 것입니다.

답변

1

일반적으로 겪고있는 것을 추측하기가 어렵습니다. 해결할 수없는 문제가있는 경우 항상 웹 서버 로그를보고 시작되지 않는 오류를 확인하십시오.

오류가 존재하지 않는 경우, 뭔가 말 (사용자의 생성이 일어날 것으로 예상 장소에서 코드에 주석을 추가하고,이 creating user를 기록하거나 다른 조건 위치에 skipped user creation, error bleh thrown.

+0

대답 할 시간을내어하지만 오류 처리 중 어느 것도 트리거되지 받고 주셔서 감사합니다. 나는 지금 이것을 풀었고 어떤 이유로 http : //www.domain.co.uk이 http : // domain.co.uk로 해석되었지만 codeigniter의 기본 URL은 www와 같았습니다. – Philwn

+0

당신은 분명히 당신의'.htaccess' 파일에 문제가 있습니다.이 [link] (http://stackoverflow.com/a/18636186/1564365)를보고 필요할 경우 사용하십시오;) – Kyslik

0

$의 설정 [ 'phpass_hash_portable'] FALSE =;

위의 코멘트를 읽기 : 'phpass_hash_portable'= 암호를 덤프 할 수 있으며, 다른 서버로 내 보낸 후 다른 서버에이 데이터베이스를 사용할 수 없습니다 FALSE로 설정하면..

config가 TRUE로 설정되어 있지 않으면 한 서버에서 다른 서버로 이동할 수 없습니다. 다른 도메인 이름으로 이동하는 것은 다른 서버로 이동하는 것과 같습니다.

관련 문제