CI 묻고 답하기

제목 [CLI 질문] 다시 한 번만 봐주세요. ㅠㅠ 부탁드립니다.
글쓴이 asdfg9822 작성시각 2014/07/28 14:50:50
댓글 : 6 추천 : 0 스크랩 : 0 조회수 : 12801   RSS

안녕하세요. CLI 질문 다시 한 번 올립니다. 코드이그나이터에서 제공하는대로 했다고 생각하는데 잘되지가 않아요 ㅠㅠ 부탁드립니다.





1. application/controllers/tools.php 저장

<?php
class Tools extends CI_Controller {

 public function message($to = 'World')
 {
  echo "Hello {$to}!".PHP_EOL;
 }
}
?>

 

2. https://192.168.30.60:50000/tools/message/to (url접근)


"Hello to!" 라는 메시지가 출력


3-1) cd /utm/httpd/htdocs/ 이동 (내프로젝트 디렉토리)

     명령 : php index.php tools message

     에러 등 출력되지 않고 무반응


3-2) cd /utm/httpd/htdocs/application/controllers ( tools.php 위치 )
 
     명령 : php tools.php tools message 안됨
            php tools.php message 안됨
     php tools.php tools/message 안됨
 
     에러 등 출력되지 않고 무반응

 

 

 


--> 로그


[DEBUG 2014-07-28 14:52:14,076] Config Class Initialized
[DEBUG 2014-07-28 14:52:14,076] Hooks Class Initialized
[DEBUG 2014-07-28 14:52:14,076] Utf8 Class Initialized
[DEBUG 2014-07-28 14:52:14,076] UTF-8 Support Enabled
[DEBUG 2014-07-28 14:52:14,076] URI Class Initialized
[DEBUG 2014-07-28 14:52:14,076] Router Class Initialized
[DEBUG 2014-07-28 14:52:14,076] Output Class Initialized
[DEBUG 2014-07-28 14:52:14,076] Security Class Initialized
[DEBUG 2014-07-28 14:52:14,076] Input Class Initialized
[DEBUG 2014-07-28 14:52:14,076] Global POST, GET and COOKIE data sanitized
[DEBUG 2014-07-28 14:52:14,076] My Custom Language Class Initialized
[DEBUG 2014-07-28 14:52:14,076] Loader Class Initialized
[DEBUG 2014-07-28 14:52:14,076] Config file loaded: /utm/httpd/htdocs/application/config/config_tg.php
[DEBUG 2014-07-28 14:52:14,076] Helper loaded: language_helper
[DEBUG 2014-07-28 14:52:14,076] Helper loaded: url_helper
[DEBUG 2014-07-28 14:52:14,076] Helper loaded: number_helper
[DEBUG 2014-07-28 14:52:14,076] Helper loaded: json_helper
[DEBUG 2014-07-28 14:52:14,076] Helper loaded: commondb_helper
[DEBUG 2014-07-28 14:52:14,076] Helper loaded: file_helper
[DEBUG 2014-07-28 14:52:14,076] Helper loaded: array_helper
[DEBUG 2014-07-28 14:52:14,076] Helper loaded: stringutils_helper
[DEBUG 2014-07-28 14:52:14,076] Helper loaded: requestsupport_helper
[DEBUG 2014-07-28 14:52:14,076] Helper loaded: qc_helper
[DEBUG 2014-07-28 14:52:14,076] Database Driver Class Initialized
[DEBUG 2014-07-28 14:52:14,076] Database Driver Class Initialized
[DEBUG 2014-07-28 14:52:14,076] Smarty Class Initialized
[DEBUG 2014-07-28 14:52:14,076] User Agent Class Initialized
[DEBUG 2014-07-28 14:52:14,076] Model Class Initialized
[INFO 2014-07-28 14:52:14,076] cli get_language

[INFO 2014-07-28 14:52:14,076] [shell] cli get_language  []
[INFO 2014-07-28 14:52:14,076] cli result #0,7,1,2
"0","0"
[DEBUG 2014-07-28 14:52:14,076] Database Driver Class Initialized
[DEBUG 2014-07-28 14:52:14,076] Database Driver Class Initialized
[INFO 2014-07-28 14:52:14,076] sql : SELECT COUNT(*) AS "numrows" FROM "sqlite_m
[DEBUG 2014-07-28 14:52:14,076] Database Driver Class Initialized
[DEBUG 2014-07-28 14:52:14,076] Database Driver Class Initialized
[DEBUG 2014-07-28 14:52:14,076] Controller Class Initialized
[INFO 2014-07-28 14:52:14,076] cli get_hostname

[INFO 2014-07-28 14:52:14,076] [shell] cli get_hostname  []
[INFO 2014-07-28 14:52:14,076] cli result #0,15,1,2
"TrusGuard","0"
[INFO 2014-07-28 14:52:14,076] cli mget get_platform;get_license;get_language;ge                                                                             ity_object;get_platform_capability_policy;get_platform_capability_misc

[INFO 2014-07-28 14:52:14,076] [shell] cli mget "get_platform;get_license;get_la                                                                             m_capability_object;get_platform_capability_policy;get_platform_capability_misc"
[INFO 2014-07-28 14:52:14,076] cli result #0,616,1,118
"70","2","4","Unknown","36ff35","","","0","0","0","0","0","0","0","0","0","0","0,"0","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1"                                                                             "500","2048","1024","4096","128","256","128","2048","256","2048","256","500000",000","3000","3000""3000",




여기까지입니다. ㅠㅠ 처음부터 시작하는 것이 아닌 누군가 구축해온 것에서 시작하는 것이라서 쉽지가 않네요..
인터넷을 찾아봐도 쉽지가 않습니다. 부탁드리겠습니다. 로그도 왜 안나오지 이러고 있었는데 log4php 라는 것을 쓰고있네요 ㅠ_ㅠ

 다음글 서로다른 포트에 따른 세션 (1)
 이전글 공유기 사용으로 인한 Disallowed Key Cha... (1)

댓글

한대승(불의회상) / 2014/07/28 14:59:27 / 추천 0
아래처럼 하면 어떻게 나오나요?
 
php index.php tools message to
asdfg9822 / 2014/07/28 15:17:55 / 추천 0
php index.php tools message 와 같이 에러가 출력되지 않고 그냥 

bash-3.1# php index.php tools message to
bash-3.1#



이렇게 나옵니다. 로그 또한 변함이 없습니다. 


참고로 $config['uri_protocol']    = 'AUTO'; 이렇게 되어있습니다. 
asdfg9822 / 2014/07/28 15:23:29 / 추천 0
실제로 그냥

         echo "1"
?> 

이런식으로 cli를 실행시키면 그냥 나오지만 

class Tools extends CI_Controller 과 같이 extends를 하면 안에 내용이 실행이 안됩니다. ㅠㅠ
한대승(불의회상) / 2014/07/28 17:26:05 / 추천 0
^^ 안될 이유가 없어 보이는데요.
아파치 에러 로그도 살펴 보세요.
asdfg9822 / 2014/07/29 09:10:47 / 추천 0
아파치 에러 로그도 살펴봤지만 cli 명령 후 어떠한 로그도 출력되지 않습니다. 흠 또 찾아볼만한 곳이 있을까요 ? 
 
변종원(웅파) / 2014/07/29 10:34:02 / 추천 0
db가 자동로드 되지 않았나 보시고 자동로드 됐으면 db connect 문제일 수 있습니다.